Inherits from OlapicEntity : NSObject
Declared in OlapicCustomerEntity.h

Overview

Represents customers on the SDK

Properties

uploader

The default uploader for the customer

@property (nonatomic, strong) OlapicUploaderEntity *uploader

Declared In

OlapicCustomerEntity.h

Instance Methods

createUploader:onSuccess:onFailure:

Create an uploader for this customer

- (void)createUploader:(NSDictionary *)metadata onSuccess:(void ( ^ ) ( OlapicUploaderEntity *uploader ))success onFailure:(void ( ^ ) ( NSError *error ))failure

Parameters

metadata

A dictionary that contains the uploader information

success

A callback block for when the uploader is successfully created

failure

A callback block for when the SDK can’t create the uploader

Availability

v1.0

Discussion

Example:

NSMutableDictionary *metadata = [[NSMutableDictionary alloc] init];
[metadata setValue:@"example@olapic.com" forKey:@"email"];
[metadata setValue:@"Example" forKey:@"screen_name"];
OlapicSDK *olapic = [OlapicSDK sharedOlapicSDK]
[[olapic customer]  createUploader:metadata
                    onSuccess:^(OlapicUploaderEntity *uploader){
                        // Now you can upload some media
                    }
                    onFailure:^(NSError *error){
                        NSLog(@"Error: %@",error.description);
                    }];

Declared In

OlapicCustomerEntity.h

getUploader:onFailure:

Get the default uploader for this customer, if it doesn’t exists it will create a new one

- (void)getUploader:(void ( ^ ) ( OlapicUploaderEntity *uploader ))success onFailure:(void ( ^ ) ( NSError *error ))failure

Parameters

success

A callback block for when the uploader is successfully retrieved

failure

A callback block for when the SDK can’t get the uploader

Availability

v1.0

Discussion

Example:

OlapicSDK *olapic = [OlapicSDK sharedOlapicSDK]
[[olapic customer]  getUploader:^(OlapicUploaderEntity *uploader){
                        // Now you can upload some media
                    }
                    onFailure:^(NSError *error){
                        NSLog(@"Error: %@",error.description);
                    }];

Declared In

OlapicCustomerEntity.h