KTKCloudClient Class Reference
Inherits from | NSObject |
---|---|
Declared in | KTKCloudClient.h |
Initialization Methods
+ sharedInstance
A shared instance of Cloud client, used by the low-level SDK methods, and suitable for use directly for any ad-hoc requests.
+ (nonnull instancetype)sharedInstance
Return Value
A shared instance of a Cloud client.
Discussion
A shared instance of Cloud client, used by the low-level SDK methods, and suitable for use directly for any ad-hoc requests.
Declared In
KTKCloudClient.h
– initWithSessionConfiguration:
Initializes and returns a cloud client object with the specified session configuration.
- (instancetype)initWithSessionConfiguration:(NSURLSessionConfiguration *)configuration
Parameters
configuration |
A configuration object that specifies certain behaviors, such as caching policies, timeouts, proxies, pipelining, TLS versions to support, cookie policies, and credential storage. |
---|
Return Value
An initialized cloud client object.
Discussion
Initializes and returns a cloud client object with the specified session configuration.
Declared In
KTKCloudClient.h
API Request Methods
– GET:parameters:completion:
Runs a cloud API call with a GET request.
- (void)GET:(NSString *)endpoint parameters:(NSDictionary *_Nullable)dictionary completion:(KTKKontaktResponseCompletionBlock _Nullable)completion
Parameters
endpoint |
The cloud API endpoint/resource. |
---|---|
dictionary |
The parameters to be serialized for the request. |
completion |
A block object to be executed when the request finishes. |
Discussion
Runs a cloud API call with a GET request.
Declared In
KTKCloudClient.h
– GET:completion:
Runs a cloud API call with a GET request for the specified url object.
- (void)GET:(NSURL *)url completion:(KTKKontaktResponseCompletionBlock _Nullable)completion
Parameters
url |
The url object for the GET request. |
---|---|
completion |
A block object to be executed when the request finishes. |
Discussion
Runs a cloud API call with a GET request for the specified url object.
This method is the best candicate for calling next or previous results url.
Please note url
must be withing kontakt.io domain.
See Also
Declared In
KTKCloudClient.h
– POST:parameters:completion:
Runs a cloud API call with a POST request.
- (void)POST:(NSString *)endpoint parameters:(NSDictionary *_Nullable)dictionary completion:(KTKKontaktResponseCompletionBlock _Nullable)completion
Parameters
endpoint |
The cloud API endpoint/resource. |
---|---|
dictionary |
The parameters to be serialized for the request. |
completion |
A block object to be executed when the request finishes. |
Discussion
Runs a cloud API call with a POST request.
Declared In
KTKCloudClient.h
– POST:url:parameters:completion:
Runs a cloud API call with a POST request.
- (void)POST:(NSString *)endpoint url:(NSURL *)url parameters:(NSDictionary *_Nullable)dictionary completion:(KTKKontaktResponseCompletionBlock _Nullable)completion
Parameters
endpoint |
The cloud API endpoint/resource. |
---|---|
url |
The cloud API url. |
dictionary |
The parameters to be serialized for the request. |
completion |
A block object to be executed when the request finishes. |
Discussion
Runs a cloud API call with a POST request.
Declared In
KTKCloudClient.h
– JSON:parameters:completion:
Runs a cloud API call with a POST request encoded for JSON payload.
- (void)JSON:(NSString *)endpoint parameters:(NSDictionary *_Nullable)dictionary completion:(KTKKontaktResponseCompletionBlock _Nullable)completion
Parameters
endpoint |
The cloud API endpoint/resource. |
---|---|
dictionary |
The parameters to be serialized for the request. |
completion |
A block object to be executed when the request finishes. |
Discussion
Runs a cloud API call with a POST request encoded for JSON payload.
Declared In
KTKCloudClient.h
– JSON:url:parameters:completion:
Runs a cloud API call with a POST request encoded for JSON payload.
- (void)JSON:(NSString *)endpoint url:(NSURL *)url parameters:(NSDictionary *_Nullable)dictionary completion:(KTKKontaktResponseCompletionBlock _Nullable)completion
Parameters
endpoint |
The cloud API endpoint/resource. |
---|---|
url |
The cloud API url. |
dictionary |
The parameters to be serialized for the request. |
completion |
A block object to be executed when the request finishes. |
Discussion
Runs a cloud API call with a POST request encoded for JSON payload.
Declared In
KTKCloudClient.h
– JSONTelemetry:parameters:completion:
Runs a telemetry cloud API call with a POST request encoded for JSON payload.
- (void)JSONTelemetry:(NSString *)endpoint parameters:(NSDictionary *_Nullable)parameters completion:(KTKKontaktResponseCompletionBlock _Nullable)completion
Parameters
endpoint |
The telemetry cloud API endpoint/resource. |
---|---|
completion |
A block object to be executed when the request finishes. |
dictionary |
The parameters to be serialized for the request. |
Discussion
Runs a telemetry cloud API call with a POST request encoded for JSON payload.
Declared In
KTKCloudClient.h
Objects Request Methods
– getObjects:parameters:completion:
Gets an objects from the cloud API with the specified Class and parameters object.
- (void)getObjects:(Class<KTKCloudModel>)objectClass parameters:(NSDictionary *_Nullable)parameters completion:(KTKKontaktResponseCompletionBlock)completion
Parameters
objectClass |
The Class of an objects to get. |
---|---|
parameters |
The parameters to be serialized for the request. |
completion |
A block object to be executed when the request finishes. |
Discussion
Gets an objects from the cloud API with the specified Class and parameters object.
Declared In
KTKCloudClient.h
– getObjects:completion:
Gets an objects from the cloud API with the specified Class.
- (void)getObjects:(Class<KTKCloudModel>)objectClass completion:(KTKKontaktResponseCompletionBlock)completion
Parameters
objectClass |
The Class of an objects to get. |
---|---|
completion |
A block object to be executed when the request finishes. |
Discussion
Gets an objects from the cloud API with the specified Class.
Declared In
KTKCloudClient.h
– getObject:primaryKey:completion:
Gets an object from the cloud API with the specified Class and primary key value.
- (void)getObject:(Class<KTKCloudModel>)objectClass primaryKey:(id)value completion:(KTKKontaktResponseCompletionBlock)completion
Parameters
objectClass |
The Class of an object to get. |
---|---|
value |
The primary key value of an object to get. |
completion |
A block object to be executed when the request finishes. |
Discussion
Gets an object from the cloud API with the specified Class and primary key value.
Declared In
KTKCloudClient.h
– createObject:completion:
Creates specified object in the cloud API.
- (void)createObject:(id<KTKCloudModel>)object completion:(KTKKontaktResponseCompletionBlock)completion
Parameters
object |
The object to be created in the cloud API. |
---|---|
completion |
A block object to be executed when the request finishes. |
Discussion
Creates specified object in the cloud API.
Declared In
KTKCloudClient.h
– updateObject:completion:
Updates specified object in the cloud API.
- (void)updateObject:(id<KTKCloudModel>)object completion:(KTKKontaktResponseCompletionBlock)completion
Parameters
object |
The object to be updated in the cloud API. |
---|---|
completion |
A block object to be executed when the request finishes. |
Discussion
Updates specified object in the cloud API.
Declared In
KTKCloudClient.h
– deleteObject:completion:
Deletes specified object in the cloud API.
- (void)deleteObject:(id<KTKCloudModel>)object completion:(KTKKontaktResponseCompletionBlock)completion
Parameters
object |
The object to be deleted in the cloud API. |
---|---|
completion |
A block object to be executed when the request finishes. |
Discussion
Deletes specified object in the cloud API.
Declared In
KTKCloudClient.h
– deleteObject:primaryKey:completion:
Deletes an object in the cloud API with the specified Class and primary key value.
- (void)deleteObject:(Class<KTKCloudModel>)objectClass primaryKey:(id)value completion:(KTKKontaktResponseCompletionBlock)completion
Parameters
objectClass |
The Class of an object to delete. |
---|---|
value |
The primary key value of an object to delete. |
completion |
A block object to be executed when the request finishes. |
Discussion
Deletes an object in the cloud API with the specified Class and primary key value.
Declared In
KTKCloudClient.h