liveservices/LiveSDK — Issue #5: Mac OS X support
Author: flemingm
Created: 2012-01-31 02:31:07+00:00
State: open

I've added a new target to IOS project that support Mac OS X following REST API Commands. are implemented so far.

-(void) getUserProfile;
-(NSURL *) getUserProfileImage;

- (void) getPermissions;
- (void) getUserAlbums;

// Not working yet: createAlbum getting missing 'name' & Untested: udpateAlbums
- (void) createAlbum: (NSString *) theFolderName folderDescription: (NSString*) description;
- (void) udpateAlbums: (NSString *) inFolderID folderName: (NSString *) theFolderName folderDescription: (NSString*) description;

- (void) getMediaInfo: (NSString *) mediaID options: (NSDictionary *) options;
- (void) getTags: (NSString *) mediaID options: (NSDictionary *) options;	// limit=2 etc
- (void) getComments: (NSString *) mediaID options: (NSDictionary *) options;
- (void) getUserContacts: (NSString *)contentID;

//- (void) createContacts: (NSString *)contentID contactList: (NSDictionary *) newContacts;
- (void) getUserFriends;
- (void) getUserApplications;
- (void) getFolderProperties: (NSString *) folderID options: (NSDictionary *) optionsDict;
- (void) getFileListInFolder: (NSString *) folderID options: (NSDictionary *) optionsDict;

- (void) getFileProperties: (NSString *) fileID;
- (NSString *) getFileURLString: (NSString *) fileID;

But I am having issue with creating albums JSON Body contains:

createAlbum call with JSON Body: '{	'name' : 'iWatermark Pro' } type: "album"
'
2012-01-30 21:29:35.833 LiveServicesMacOS[39187:a0f] startPOSTRequest /v5.0/me/skydrive as Type: application/json
body: 45 lenth
2012-01-30 21:29:37.278 LiveServicesMacOS[39187:a0f] response: 400 - URL path /v5.0/me/skydrive
2012-01-30 21:29:37.278 LiveServicesMacOS[39187:a0f] Path: @ error: /v5.0/me/skydrive
Error return:

error = {
code = "request_parameter_missing";
message = "The provided request entity body is missing a required parameter 'name'. Required parameters are the following: 'name'.";
};
}

Any suggestions?

I also using JSON Parser :

@mainpage A strict JSON parser and generator for Objective-C

JSON (JavaScript Object Notation) is a lightweight data-interchange
format. This framework provides two apis for parsing and generating
JSON. One standard object-based and a higher level api consisting of
categories added to existing Objective-C classes.

Learn more on the http://code.google.com/p/json-framework project site.

This framework does its best to be as strict as possible, both in what it
accepts and what it generates. For example, it does not support trailing commas
in arrays or objects. Nor does it support embedded comments, or
anything else not in the JSON specification. This is considered a feature.