mental32 / spotify.py

🌐 API wrapper for Spotify 🎶
https://spotifypy.readthedocs.io/en/latest/
MIT License
150 stars 38 forks source link

Can't use parameters with user.top_artists() #50

Closed drowe-official closed 4 years ago

drowe-official commented 4 years ago

Regardless of what parameters you set for user.top_artists(), such as:

**user.top_artists(limit=50,offset=0, time_range="long_term")**

You'll still get the default limit, offset and time range regardless of what you set the params to. I managed to fix it locally by fiddling around with the library. I believe the problem is that the payload in the function top_artists_or_tracks(), is not sent the HTTP request.

I fixed it by changing line 854 in http.py from return self.request(route) to return self.request(route, params=payload)

I'd make a pull request but I'm new at this stuff.

mental32 commented 4 years ago

@drowe4 Thanks for reporting this! I can reproduce and will be pushing a fix soon to both Github and PyPI :)

mental32 commented 4 years ago

Fixed by: https://github.com/mental32/spotify.py/commit/adee6d2a3c1403ff3185269cc5b4058f16e78fe4