Streamlyne / Cocoa-SDK

Streamlyne API for Cocoa Developers
https://github.com/Streamlyne/Cocoa-SDK
2 stars 1 forks source link

Improve Model class #8

Open Glavin001 opened 10 years ago

Glavin001 commented 10 years ago

Rename Node to Model See http://emberjs.com/api/data/classes/DS.Model.html

Glavin001 commented 10 years ago
Glavin001 commented 10 years ago

The following should simply forward to the SLAPIManager and pass themselves (self) as the record, when applicable.

Glavin001 commented 10 years ago
Glavin001 commented 10 years ago

Here are the headers so far:

- (instancetype) createRecord:(NSDictionary *)properties;
- (PMKPromise *) findById:(SLNid)nid;
- (PMKPromise *) findQuery:(NSDictionary *)query;
- (PMKPromise *) findAll;
- (PMKPromise *) findMany:(NSArray *)ids;
- (instancetype) updateRecord:(NSDictionary *)properties;
- (instancetype) deleteRecord;
Glavin001 commented 10 years ago
Glavin001 commented 10 years ago

Inspecting Core Data attributes: http://oleb.net/blog/2011/05/inspecting-core-data-attributes/

Glavin001 commented 10 years ago

Ideally use something like https://github.com/adamelliot/Inflections to generate the result for the type method. See https://github.com/Streamlyne/web-app/blob/develop/app/scripts/adapters/streamlyne_adapter.js#L101-L104 for what the web-app does.

Glavin001 commented 10 years ago
Glavin001 commented 10 years ago
Glavin001 commented 10 years ago
Glavin001 commented 10 years ago