Quantcast
Channel: The Echo Nest Developer Forum
Viewing all articles
Browse latest Browse all 1582

Search song: Didn't get deezer's track ID

$
0
0

Hey guys,

maybe you could help me. I was trying to get the deezer track id, but I always get an error message:

bucket - Invalid parameter: the "tracks" bucket may only be used in conjunction with a bucket specifying an id space

Here's my code:

NSMutableDictionary *p = [NSMutableDictionary new];
[p setValue:[NSNumber numberWithInteger:1] forKey:@"results"];
    [p setValue:@"Radiohead" forKey:@"artist"];
    [p setValue:@"Karma Police" forKey:@"title"];
    [p setValue:@"id:deezer" forKey:@"bucket"];
    [p setValue:@"tracks" forKey:@"bucket"];
    [p setValue:@"true" forKey:@"limit"];

[ENAPIRequest GETWithEndpoint:@"song/search" andParameters:p andCompletionBlock:^(ENAPIRequest *request) { if (request.completedSuccessfully) { NSLog(@"response: %@", request.response); } else { NSLog(@"errorMessage: %@", request.errorMessage);}}];

What's wrong? EN-api_key is set. Written in Objective-C for iOS. Using enios/ENAPILibrary. If I delete tracks/bucket and true/limit, I get the foreign_id = "deezer:artist:399".


Viewing all articles
Browse latest Browse all 1582

Trending Articles