Closed klinge closed 5 years ago
Hi @klinge,
UserApi.GetRecentScrobbles
calls the user.getRecentTracks
API. It returns a PageResponse<LastTrack>
. On PageResponse<T>
objects, there are the properties Page
, PageSize
, TotalItems
, TotalPages
- see the source here. These properties are available on every API response that returns a list of items.
The user
property is not available. However UserApi.GetRecentScrobbles
and other UserApi
methods require you to pass this in as an argument. Do you have any reason why it needs to be made available on the response object (other than convenience)?
Thanks for the quick reply. I missed that the properties for paging were returned in the PageResponseuser
property there is no need to have it in the response object. So please feel free to close this issue.
I'm trying to get recent tracks for a user and display them using pagination.
In UserApi I find a method called UserApi.GetRecentScrobbles (I find no method called GetRecentTracks). GetRecentScrobbles works well for getting a users recent tracks, but it returns an array of LastTrack:s and nothing else.
According to the lastfm api (https://www.last.fm/api/show/user.getRecentTracks) the response has a few attributes as well namely: user="username" page="int" perPage="int" totalPages="int"
Is there a way to get these attributes fron UserApi.GetRecentScrobbles?