#import <CBItem.h>
Instance Methods | |
(CBItem *) | - initWithData:collectionID: |
(void) | - save |
(void) | - refresh |
(void) | - destroy |
(id) | - getValueFor: |
Properties | |
NSMutableDictionary * | data |
NSString * | collectionID |
Class that represents an individual item from the platform
- (void) destroy |
Deletes the Item on the server This cannot be undone.
- (id) getValueFor: | (NSString *) | key |
Gets an item out of the data attribute that matches the given string
key | String used to find a value in the dictionary |
- (CBItem *) initWithData: | (NSDictionary *) | inputData | |
collectionID: | (NSString *) | colID | |
Initializes the Item with data and sets the data and collectionID.
inputData | A dictionary that holds data for the item |
colID | A string that holds the ID of the collection to which this item belongs |
- (void) refresh |
Pulls down any changes that have been made on the server to the item since being instantiated. This updates the data attribute to reflect the current state of the Item on the server
- (void) save |
Saves any changes that have been made to the data property to the Platform This will update the server
|
readwritenonatomicstrong |
A string holding the ID of the collection to which this item belongs
|
readwritenonatomicstrong |
A dictionary that holds the data that was stored in the platform.