Re: Search & offset

Wieland Hoffmann <[email protected]> Thu, 11 Dec 2014 22:10:24 +0100
Newsgroups gmane.comp.audio.musicbrainz.devel
Message-ID <[email protected]>
Hallo [email protected]:
> I am playing around with musicbrainz and am running into a problem with 
> paged search results. See the first query below, offset has been set to 
> zero, search results are returned, all fine. Then I set the offset to 25 
> (second query) and am surprised to get the exact same results as the 
> first query. Please tell me what I am doing wrong here. 
>  
> Thanks, 
>  
> Jos 
>  
>  
> curl 
> http://musicbrainz.org/ws/2/release/?query=artist:artistname=sting&offset=0
> [...]
> curl 
> http://musicbrainz.org/ws/2/release/?query=artist:artistname=sting&offset=25
> [...]

You need to put the URL into quotes, otherwise your shell will treat the
ampersand as a signal to background the curl process in a subshell and
treat "offset=25" as a simple assignment to a variable called "offset".

Then

> curl "http://musicbrainz.org/ws/2/release/?query=artist:artistname=sting&offset=0"

and

> curl "http://musicbrainz.org/ws/2/release/?query=artist:artistname=sting&offset=25"

will show different results.

-- 
Wieland