HPCSCDNClient Class Reference
Inherits from | HPCSSwiftClient : AFHTTPClient |
Declared in | HPCSCDNClient.h |
Tasks
Other Methods
-
identityClient
the interface to the identity system
property
Creating and Initializing HPCSCDN Clients
-
– initWithIdentityClient:
Creates a cdn client
List CDN Enabled Containers
-
– cdnContainers:failure:
Retrieves the list of CDN enabled Swift containers
Enable CDN for Container
-
– enableCDNForContainer:success:failure:
Enable a Swift container as a CDN container
Get CDN Enabled Container Metadata
-
– getCDNContainerMetadata:success:failure:
Get CDN specific metadata for a container
-
– setCDNContainer:metadata:success:failure:
Set CDN specific metadata for a container
Delete CDN Enabled Container
-
– deleteCDNContainer:success:failure:
Delete CDN enabled container
Instance Methods
cdnContainers:failure:
Retrieves the list of CDN enabled Swift containers
- (void)cdnContainers:(void ( ^ ) ( NSHTTPURLResponse *responseObject , NSArray *records ))success failure:(void ( ^ ) ( NSHTTPURLResponse *responseObject , NSError *error ))failure
Parameters
- success
returns an NSArray of containers
- failure
block called for a failed call
Declared In
HPCSCDNClient.h
deleteCDNContainer:success:failure:
Delete CDN enabled container
- (void)deleteCDNContainer:(id)container success:(void ( ^ ) ( NSHTTPURLResponse *responseObject ))success failure:(void ( ^ ) ( NSHTTPURLResponse *responseObject , NSError *error ))failure
Parameters
- container
an object which should respond to “name”, the name of the container to delete
- success
success block
- failure
block called for a failed call
Declared In
HPCSCDNClient.h
enableCDNForContainer:success:failure:
Enable a Swift container as a CDN container
- (void)enableCDNForContainer:(id)object success:(void ( ^ ) ( NSHTTPURLResponse *responseObject ))success failure:(void ( ^ ) ( NSHTTPURLResponse *responseObject , NSError *error ))failure
Parameters
- object
an object which should respond to “name”, the name of the container to CDN enable
- success
success block
- failure
block called for a failed call
Declared In
HPCSCDNClient.h
getCDNContainerMetadata:success:failure:
Get CDN specific metadata for a container
- (void)getCDNContainerMetadata:(id)container success:(void ( ^ ) ( NSHTTPURLResponse *responseObject , NSDictionary *metadata ))success failure:(void ( ^ ) ( NSHTTPURLResponse *response , NSError *error ))failure
Parameters
- container
an object which should respond to “name”, the name of the container to get metadata from
- success
success block
- failure
block called for a failed call
Declared In
HPCSCDNClient.h
initWithIdentityClient:
Creates a cdn client
- (id)initWithIdentityClient:(HPCSIdentityClient *)client
Parameters
- client
the HPCSIdentityClient to use as the Identity Service Client
Discussion
This is designated initializer. Typically its called in the following fashion (implicitly) from a singleton instance of HPCSIdentityClient:
HPCSIdentityClient *client = [HPCSIdentityClient sharedClient];
//this calls initWithIdentityClient
HPCSCDNClient *cdnClient = [client cdnClient];
Declared In
HPCSCDNClient.h
setCDNContainer:metadata:success:failure:
Set CDN specific metadata for a container
- (void)setCDNContainer:(id)container metadata:(NSDictionary *)metadata success:(void ( ^ ) ( NSHTTPURLResponse *responseObject , NSDictionary *metadata ))success failure:(void ( ^ ) ( NSHTTPURLResponse *response , NSError *error ))failure
Parameters
- container
an object which should respond to “name”, the name of the container to set metadata on
- metadata
the metadata to set
- success
success block
- failure
block called for a failed call
Declared In
HPCSCDNClient.h