Reputation: 263
I am reading the user's info by following Deezer Documentation and making a request with the servicePath "user/me". I get the User ID and try to make a request with the path:
NSString* playlistPath = [NSString stringWithFormat:@"playlist/%@", self.deezerID];
DeezerRequest* request = [_deezerConnect createRequestWithServicePath:playlistPath
params:nil
delegate:self];
[_deezerConnect launchAsyncRequest:request];
NSLog(@"Path: %@", playlistPath);
An I receive the information from this:
/* Delegate methods */
#pragma mark - DeezerRequestDelegate
- (void)request:(DeezerRequest *)request didReceiveResponse:(NSData *)data {
NSError *error;
id myJSON = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error];
NSDictionary *jsonDic = (NSDictionary *)myJSON;
if (error != nil) {
NSLog(@"Error parsing JSON.");
}
else {
NSLog(@"Dictionary: %@", jsonDic);
}
self.deezerID = jsonDic[@"id"];
}
The problem is that I am getting the following error:
Dictionary: {
error = {
code = 800;
message = "no data";
type = DataException;
};
}
What does this mean? Am I making a correct request in order to retrieve the user's playlists and its tracks?
What I want to do is to get the USERs Playlists and allow him to share it to a WebService to another User. Is this even possible?
Upvotes: 0
Views: 593
Reputation: 877
You have to query the user endpoint instead: user/USER_ID/playlists. You can use the playlist endpoint only with playlist ids. Documentation is here: http://developers.deezer.com/api/user/playlists
Upvotes: 1