PromyLOPh / pandora-apidoc

pandora.com API documentation
https://6xq.net/pandora-apidoc/
Do What The F*ck You Want To Public License
48 stars 19 forks source link

Question: How to paginate beyond the 100 limit on station feedback.thumbsup list #25

Open feczo opened 6 years ago

feczo commented 6 years ago

This is not supported by the current library, but I patched the models just to return the dict of feedback as per documentation https://6xq.net/pandora-apidoc/json/stations/

so I can do:

from pandora import clientbuilder p = clientbuilder.PydoraConfigFileBuilder() client = p.build() s = client.get_station('1316180904578479950')

so I can get the songs if I iterate through, single example

s.feedback['thumbsUp'][0]['songName'] u'Stray Cat Strut'

my issue is that I can not get them all

len(s.feedback['thumbsUp']) 100

s.feedback['totalThumbsUp'] 132

I cross checked my results with node implementation https://www.npmjs.com/package/anesidora and the results are the same so its an API limit.

There must be a way to paginate and get a list of the remaining 32 items (and several hundreds on other stations where the likes are 300+ total)

Any suggestions? I probably need to reverse engineer the UI traffic otherwise.

feczo commented 6 years ago

Looks like there is POST /api/v1/station/getStationFeedback parameters: pageSize: pageSize, positive: positive, startIndex: (= pageNumber * pageSize), stationId: stationId

as per https://pastebin.com/9br3VZjX

PromyLOPh commented 6 years ago

That request URL looks like it belongs to the web client’s API. station.getStationFeedback either does not exist or is not used by the mobile client (Android), which is documented here. And station.getStation does not support pagination as far as I know.