This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSString *containerName = @"paintings"; | |
NSDictionary *item = @{@"name":self.nameTextField.text}; | |
[[CCHVaultService sharedService] createItem:item inContainer:containerName completion:^(NSDictionary *carbonResponse, NSError *error) { | |
if (error) { | |
NSLog(@"Error %@", error); | |
} else { | |
NSLog(@"Success %@", carbonResponse); | |
} | |
}]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[CCHVaultService sharedService] getItemsInContainer:@"paintings" completion:^(NSArray *carbonResponses, NSError *error) { | |
if (error) { | |
NSLog(@"Error %@", error); | |
} else { | |
NSLog(@"Success %@", carbonResponse); | |
} | |
}]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSMutableDictionary *item = [NSMutableDictionary dictionaryWithDictionary:self.item]; | |
[item setObject:self.nameTextField.text forKey:@"name"]; | |
[[CCHVaultService sharedService] updateItem:item completion:^(NSDictionary *carbonResponse, NSError *error) { | |
if (error) { | |
NSLog(@"Error %@",error); | |
} else { | |
NSLog(@"Success %@", carbonResponse); | |
} | |
}]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[CCHVaultService sharedService] deleteItem:item completion:^(NSDictionary *carbonResponse, NSError *error) { | |
if (!error) { | |
NSLog(@"Item Deleted %@", item); | |
} else { | |
NSLog(@"Error deleting item %@", item); | |
} | |
}]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSData *imageData = UIImageJPEGRepresentation(profilePicture,.99); | |
NSString *fileName = @"ProfilePicture.png"; | |
CCHVaultResource *profilePictureResource = [[CCHVaultResource alloc]initWithName:@"profile_picture_url" | |
fileName:fileName | |
mimeType:@"image/png" | |
data:imageData]; | |
NSString *container = @"profiles"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
event = { | |
context = (), | |
data = {}, | |
name = "location_changed", | |
payload = {} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
event = { | |
context = ( | |
{ | |
"location_context" = { | |
"location_context" = { | |
altitude = 0; | |
course = 0; | |
datetime = "2014-03-26 20:07:41 +0000"; | |
"device_id" = "BEE8D95B-01FF-4835-8A71-F1D89A39771C"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data = { | |
altitude = 0; | |
course = 0; | |
datetime = "2014-03-26 20:07:41 +0000"; | |
"device_id" = "BEE8D95B-01FF-4835-8A71-F1D89A39771C"; | |
latitude = 0; | |
longitude = 0; | |
speed = 0; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data = { | |
altitude = 0; | |
course = "-1"; | |
datetime = "2014-03-26 21:20:24 +0000"; | |
"device_id" = "BEE8D95B-01FF-4835-8A71-F1D89A39771C"; | |
fence = { | |
id = sandcreek; | |
latitude = "30.054381"; | |
longitude = "-95.17071199999999"; | |
radius = 100; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data = { | |
altitude = "21.54464340209961"; | |
beacon = { | |
major = ""; | |
minor = ""; | |
name = JP; | |
uuid = "E2C56DB5-DFFB-48D2-B060-8876223462A3"; | |
}; | |
course = "-1"; | |
datetime = "2014-03-26 20:38:20 +0000"; |