curl - Google Music API: how to request the next 1000 songs? -


i'm trying figure out how use google music api. managed auth token described in http://dpogue.ca/gmusic.html:

$ curl -d accounttype=google        -d email=jondoe@gmail.com            -d passwd=<<password>>        -d service=sj        https://www.google.com/accounts/clientlogin  sid=dqb... lsid=dqc... auth=dqa... 

now i'm able request list of tracks in library:

$ curl --header "authorization: googlelogin auth=dqa..."             https://www.googleapis.com/sj/v1beta1/tracks > list 

however, returns list of 1000 tracks.

$ grep -c albumartist list 1000 

how request next 1000 tracks? i've tried append nextpagetoken url:

$ grep nextpage list "nextpagetoken": "kmm...ai=" $ curl --header "authorization: googlelogin auth=dqa..."             https://www.googleapis.com/sj/v1beta1/tracks?pagetoken=kmm...ai= > list2 

but same first 1000 tracks.

how tell googleapis.com return next bunch?

thanks!

first, advised use different url: https://www.googleapis.com/sj/v1beta1/trackfeed

the correct way provide nextpagetoken second request send per post json:

$ curl   --header "authorization: googlelogin auth=dqa..."        --header 'content-type: application/json'   --data "{'start-token': 'kmm...'}   "https://www.googleapis.com/sj/v1beta1/trackfeed   > list2 

for me turned out easier request tracks @ once providing

  --data "{'max-results': '20000'} 

thanks darryl pogue http://dpogue.ca/!


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -