setlist/version is returning "set" : null

setlist/version is returning "set" : null

Posted 11 Oct 2018, 8:16:10

Hi!

I'm trying to get set list details (e.g. artists, songs etc) using the SetlistByVersionID API

Whenever, I try this, I get a null set

e.g.

https://api.setlist.fm/rest/1.0/setlist/version/7be1aaa0

returns

{“artist”:{“mbid”:b10bbbfc-cf9e-42e0-be17-e2c3e1d2600d”,“tmid Beatles”,sortName, The”,disambiguation Angeles”,stateCode States”}},url Bowl”},tour American Tour 1964″},set“}

and set

However, the URL returned has full song details

https://www.setlist.fm/setlist/the-beatles/1964/hollywood-bowl-los-angeles-ca-63de4613.html

Trying SetlistByID instead has the same behavior (in this case using ID == 63de4613)

I am setting the x-api-key to my API key, and also Accept:[application/json]

Have I missed something?

Cheers!

Jason

Last edited 11 Oct 2018, 8:16:55

Re: setlist/version is returning "set" : null

Posted 11 Oct 2018, 9:04:15

Hi,

can't reproduce, I'm always getting the expected set, I used this curl command (with the actual key instead of xxx):

curl -X GET —header 'Accept: application/json' —header 'x-api-key: xxx' 'https://api.setlist.fm/rest/1.0/setlist/version/7be1aaa0'

Re: setlist/version is returning "set" : null

Posted 11 Oct 2018, 17:18:31

Yes, the curl works for me too

With curl, my HTTP headers look like this

> GET /rest/1.0/setlist/version/7be1aaa0 HTTP/1.1
> Host: api.setlist.fm
> User-Agent: curl/7.49.0
> X-Api-Key: ${API_KEY}
> Accept: application/json
>

with my go code, they look like this

GET /rest/1.0/setlist/version/7be1aaa0 HTTP/1.1
Host: api.setlist.fm
User-Agent: Go-http-client/1.1
Accept: application/json
X-Api-Key: ${API_KEY}
Accept-Encoding: gzip

In the go code case, I get most of the correct response, but the I don't get the actual list of sets… I just get “set” : null,“info” : “” (everything else is there). I also notice that's a single empty set, not a list of sets. Very odd

Last edited 12 Oct 2018, 0:57:20

Re: setlist/version is returning "set" : null

Posted 12 Oct 2018, 5:20:25

Ok – I've worked it out – there was a bug in the go library I was using

It was expecting a JSON array of “set”, but the setlist.fm schema has that one level down under “sets”

Post Reply

You're not allowed to do this, please sign in first.