Deezer Documentation に従い、servicePath "user/me" でリクエストを作成して、ユーザーの情報を読んでいます。ユーザー ID を取得し、次のパスでリクエストを試みます。
NSString* playlistPath = [NSString stringWithFormat:@"playlist/%@", self.deezerID];
DeezerRequest* request = [_deezerConnect createRequestWithServicePath:playlistPath
params:nil
delegate:self];
[_deezerConnect launchAsyncRequest:request];
NSLog(@"Path: %@", playlistPath);
私はこれから情報を受け取ります:
/* 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"];
}
問題は、次のエラーが発生することです。
Dictionary: {
error = {
code = 800;
message = "no data";
type = DataException;
};
}
これは何を意味するのでしょうか?ユーザーのプレイリストとそのトラックを取得するために、正しいリクエストを行っていますか?
私がやりたいことは、ユーザーのプレイリストを取得し、それを別のユーザーと Web サービスで共有できるようにすることです。これは可能ですか?