OlapicStreamHandler Class Reference
| Inherits from | OlapicHandler : NSObject |
| Declared in | OlapicStreamHandler.h |
Instance Methods
getStreamByID:onSuccess:onFailure:
Get a stream entity by its ID
- (void)getStreamByID:(NSString *)ID onSuccess:(void ( ^ ) ( OlapicStreamEntity *stream ))success onFailure:(void ( ^ ) ( NSError *error ))failureParameters
- ID
The stream ID
- success
A callback block for when the stream is successfully retrieved
- failure
A callback block for when the SDK can’t get the stream
Availability
v1.0
Discussion
Example:
[[[OlapicSDK sharedOlapicSDK] streams] getStreamByID:@"ID"
onSuccess:^(OlapicStreamEntity *stream){
label.text = [stream get:@"name"];
}
onFailure:^(NSError *error){
NSLog(@"Error: %@",error.description);
}];
Declared In
OlapicStreamHandler.hgetStreamByTagKey:onSuccess:onFailure:
Get a stream entity by its tag_key property
- (void)getStreamByTagKey:(NSString *)tag onSuccess:(void ( ^ ) ( OlapicStreamEntity *stream ))success onFailure:(void ( ^ ) ( NSError *error ))failureParameters
- tag
The value of the tag_key property
- success
A callback block for when the stream is successfully retrieved
- failure
A callback block for when the SDK can’t get the stream
Availability
v1.0
Discussion
Example:
[[[OlapicSDK sharedOlapicSDK] streams] getStreamByTagKey:@"my_tag"
onSuccess:^(OlapicStreamEntity *stream){
label.text = [stream get:@"name"];
}
onFailure:^(NSError *error){
NSLog(@"Error: %@",error.description);
}];
Declared In
OlapicStreamHandler.hgetStreamFromURL:onSuccess:onFailure:
Get a stream entity from it’s API URL
- (void)getStreamFromURL:(NSString *)URL onSuccess:(void ( ^ ) ( OlapicStreamEntity *stream ))success onFailure:(void ( ^ ) ( NSError *error ))failureParameters
- URL
The API URL for the stream
- success
A callback block for when the stream is successfully retrieved
- failure
A callback block for when the SDK can’t get the stream
Availability
v1.0
Discussion
Example:
[[[OlapicSDK sharedOlapicSDK] streams] getStreamFromURL:@"streams/001"
onSuccess:^(OlapicStreamEntity *stream){
label.text = [stream get:@"name"];
}
onFailure:^(NSError *error){
NSLog(@"Error: %@",error.description);
}];
Declared In
OlapicStreamHandler.hgetStreamFromURL:onSuccess:onFailure:parameters:
Get the Stream entity from API’s URL with extra parameters
- (void)getStreamFromURL:(NSString *)URL onSuccess:(void ( ^ ) ( OlapicStreamEntity *stream ))success onFailure:(void ( ^ ) ( NSError *error ))failure parameters:(NSDictionary *)parametersParameters
- URL
The API URL for the stream
- success
A callback block for when the stream is successfully retrieved
- failure
A callback block for when the SDK can’t get the stream
- parameters
A list of parameters for the request, like ‘count’ or ‘limit’
Availability
v1.0
Discussion
Example:
[[[OlapicSDK sharedOlapicSDK] streams] getStreamFromURL:@"streams/001"
onSuccess:^(OlapicStreamEntity *stream){
label.text = [stream get:@"name"];
}
onFailure:^(NSError *error){
NSLog(@"Error: %@",error.description);
} parameters:nil];
Declared In
OlapicStreamHandler.hsearchStreamsForCuration:onSuccess:onFailure:
Get Streams entities for curation
- (void)searchStreamsForCuration:(NSString *)query onSuccess:(void ( ^ ) ( NSDictionary *streams ))success onFailure:(void ( ^ ) ( NSError *error ))failureParameters
- query
Any string that matches the name, the product_url or the product_identifier of the stream
- success
A callback block for when the streams are successfully retrieved
- failure
A callback block for when the SDK can’t get the streams
Discussion
Example:
[[[OlapicSDK sharedOlapicSDK] streams] searchStreamsForCuration:@"olapic"
onSuccess:^(NSDictionary *streams) {
NSLog(@"%@", streams);
}
onFailure:^(NSError *error) {
NSLog(@"Error: %@",error.description);
}];
Declared In
OlapicStreamHandler.h