Inherits from HPCSSwiftClient : AFHTTPClient
Declared in HPCSCDNClient.h

Overview

The interface to the CDN system

Tasks

Other Methods

Creating and Initializing HPCSCDN Clients

List CDN Enabled Containers

Enable CDN for Container

Get CDN Enabled Container Metadata

Delete CDN Enabled Container

Properties

identityClient

the interface to the identity system

@property (retain) HPCSIdentityClient *identityClient

Declared In

HPCSCDNClient.h

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