grantmd/go-rdio — pull request #2 by tangerilli (2014-07-17 06:38:39+00:00)
Title: Add support for the getHistoryForUser method

Although it's undocumented, this request allows you to fetch the listening history for a user. Included "optional" params 'start' and 'count' because they were necessary for my application, but if optional params are added to the library as a whole in some way, these could be made optional. Unpacks the response a bit before returning it, because I don't feel the parent object is very useful (particularly since last_transaction isn't documented). Returns a list of sources, where each source might be an album or a station. A source contains an overall time and a list of tracks that were played, and each track contains a timestamp.