Feature
- Deprecate the synchronous method
KeyValueStore.getPublicUrl(key: string).
- Introduce a new asynchronous method
KeyValueStore.getRecordPublicUrl(key: string).
Motivation
The current KeyValueStore.getPublicUrl(key) method has several issues that impact developer experience, performance, and maintainability 👇
- Synchronous: The method is synchronous.
- Confusing name 🤔: With the recent addition of a public URL for the list of keys, the name
getPublicUrl is ambiguous.
- Lack of code reuse: The method manually constructs the URL string instead of calling the apify-client. This creates redundant logic.
Introducing an async method with a more specific name (getRecordPublicUrl) that leverages the apify-client will solve these issues.
Ideal solution or implementation, and any additional constraints
-
Mark the existing KeyValueStore.getPublicUrl(key) method as deprecated. The deprecation message should advise users to switch to the new getRecordPublicUrl method.
-
Implement the new method async getRecordPublicUrl(key: string) within the KeyValueStore class. This new method will call the appropriate apify-client function, keyValueStore(id).getRecordUrl(key), and return the resulting URL.
Alternative solutions or implementations
No response
Other context
No response
Feature
KeyValueStore.getPublicUrl(key: string).KeyValueStore.getRecordPublicUrl(key: string).Motivation
The current
KeyValueStore.getPublicUrl(key) method has several issues that impact developer experience, performance, and maintainability 👇getPublicUrlis ambiguous.Introducing an async method with a more specific name (
getRecordPublicUrl) that leverages the apify-client will solve these issues.Ideal solution or implementation, and any additional constraints
Mark the existing
KeyValueStore.getPublicUrl(key)method as deprecated. The deprecation message should advise users to switch to the newgetRecordPublicUrlmethod.Implement the new method async
getRecordPublicUrl(key: string)within theKeyValueStoreclass. This new method will call the appropriate apify-client function,keyValueStore(id).getRecordUrl(key), and return the resulting URL.Alternative solutions or implementations
No response
Other context
No response