#import <HttpRetriever.h>
HttpRetriever class provides the means to download your resources. Before trying to download any resources, your retrievers need to be configured by setting your account ID, project ID, authentication key and application ID.
- Note
- Do not initialize this class directly, it will crash at runtime. Use the specific retriver subclasses instead.
◆ accountIdWithError:()
+ (NSString * _Nullable) accountIdWithError: |
|
(NSError *_Nullable *_Nullable) |
error |
|
Returns the account ID defined for all retrievers.
- Parameters
-
error | The error representing the reason for the failure |
- Returns
- The account ID
◆ apiVersionWithError:()
+ (NSString * _Nullable) apiVersionWithError: |
|
(NSError *_Nullable *_Nullable) |
error |
|
Returns the API version defined for all retrievers.
- Parameters
-
error | The error representing the reason for the failure |
- Returns
- The API version
◆ applicationIdWithError:()
+ (NSString * _Nullable) applicationIdWithError: |
|
(NSError *_Nullable *_Nullable) |
error |
|
Returns the application ID defined for all retrievers.
- Parameters
-
error | The error representing the reason for the failure |
- Returns
- The application ID
◆ authenticationKeyWithError:()
+ (NSString * _Nullable) authenticationKeyWithError: |
|
(NSError *_Nullable *_Nullable) |
error |
|
Returns the authentication key defined for all retrievers.
- Parameters
-
error | The error representing the reason for the failure |
- Returns
- The authentication key
◆ destinationFileWithError:()
- (NSString * _Nullable) destinationFileWithError: |
|
(NSError *_Nullable *_Nullable) |
error |
|
Returns the file path where the retriever downloads the required resource if retrieveToFileWithError: is used.
- Parameters
-
error | The error representing the reason for the failure |
- Returns
- The file path where the retriever downloads the required resource
◆ hostNameWithError:()
+ (NSString * _Nullable) hostNameWithError: |
|
(NSError *_Nullable *_Nullable) |
error |
|
Returns the host name defined for all retrievers.
- Parameters
-
error | The error representing the reason for the failure |
- Returns
- The host name
◆ projectIdWithError:()
+ (NSString * _Nullable) projectIdWithError: |
|
(NSError *_Nullable *_Nullable) |
error |
|
Returns the project ID defined for all retrievers.
- Parameters
-
error | The error representing the reason for the failure |
- Returns
- The project ID
◆ retrieveToFileWithError:()
- (BOOL) retrieveToFileWithError: |
|
(NSError *_Nullable *_Nullable) |
error |
|
Retrieves the required resource to file.
- Precondition
- account ID, project ID, authentication key and destination file are set.
- Parameters
-
error | The error representing the reason for the failure |
- Returns
- True on success, false in case an error occured
◆ retrieveToStringWithError:()
- (NSString * _Nullable) retrieveToStringWithError: |
|
(NSError *_Nullable *_Nullable) |
error |
|
Retrieves the required resource and returns it as a string.
- Precondition
- account ID, project ID and authentication key are set.
- Parameters
-
error | The error representing the reason for the failure |
- Returns
- The resource as a string on success, nil in case an error occured
◆ setAccountId:withError:()
+ (BOOL) setAccountId: |
|
(NSString *_Nonnull) |
accountId |
withError: |
|
(NSError *_Nullable *_Nullable) |
error |
|
|
| |
Sets the account ID of all retrievers.
- Parameters
-
accountId | The new account ID |
error | The error representing the reason for the failure |
- Returns
- True on success, false in case an error occured
◆ setApiVersion:withError:()
+ (BOOL) setApiVersion: |
|
(NSString *_Nonnull) |
apiVersion |
withError: |
|
(NSError *_Nullable *_Nullable) |
error |
|
|
| |
Sets the API version of all retrievers.
- Parameters
-
apiVersion | The new API version |
error | The error representing the reason for the failure |
- Returns
- True on success, false in case an error occured
◆ setApplicationId:withError:()
+ (BOOL) setApplicationId: |
|
(NSString *_Nonnull) |
applicationId |
withError: |
|
(NSError *_Nullable *_Nullable) |
error |
|
|
| |
Sets the application ID of all retrievers.
- Parameters
-
applicationId | The new application ID |
error | The error representing the reason for the failure |
- Returns
- True on success, false in case an error occured
◆ setAuthenticationKey:withError:()
+ (BOOL) setAuthenticationKey: |
|
(NSString *_Nonnull) |
authenticationKey |
withError: |
|
(NSError *_Nullable *_Nullable) |
error |
|
|
| |
Sets the authentication key of all retrievers.
- Parameters
-
authenticationKey | The new authentication key |
error | The error representing the reason for the failure |
- Returns
- True on success, false in case an error occured
◆ setDestinationFile:withError:()
- (BOOL) setDestinationFile: |
|
(NSString *_Nonnull) |
destinationFile |
withError: |
|
(NSError *_Nullable *_Nullable) |
error |
|
|
| |
Sets the file path where the retriever downloads the required resource if retrieveToFileWithError: is used.
- Parameters
-
destinationFile | The file path where the resource is downloaded |
error | The error representing the reason for the failure |
- Returns
- True on success, false in case an error occured
◆ setHostName:withError:()
+ (BOOL) setHostName: |
|
(NSString *_Nonnull) |
hostName |
withError: |
|
(NSError *_Nullable *_Nullable) |
error |
|
|
| |
Sets the host name of all retrievers.
- Parameters
-
hostName | The new host name |
error | The error representing the reason for the failure |
- Returns
- True on success, false in case an error occured
◆ setProjectId:withError:()
+ (BOOL) setProjectId: |
|
(NSString *_Nonnull) |
projectId |
withError: |
|
(NSError *_Nullable *_Nullable) |
error |
|
|
| |
Sets the project ID of all retrievers.
- Parameters
-
projectId | The new project ID |
error | The error representing the reason for the failure |
- Returns
- True on success, false in case an error occured
◆ urlStringWithError:()
- (NSString * _Nullable) urlStringWithError: |
|
(NSError *_Nullable *_Nullable) |
error |
|
Returns the URL string of the retriever.
- Parameters
-
error | The error representing the reason for the failure |
- Returns
- The URL string of the retriever
The documentation for this class was generated from the following file: