Skip to content

Commit

Permalink
Merge db0054d into 52c4a6f
Browse files Browse the repository at this point in the history
  • Loading branch information
kriim committed Feb 19, 2016
2 parents 52c4a6f + db0054d commit 7848123
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
7 changes: 4 additions & 3 deletions mopidy_soundcloud/soundcloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,10 @@ def get_followings(self, query_user_id=None):
return self._get('users/%s/tracks.json' % query_user_id)

users = []
for playlist in self._get('me/followings.json?limit=60'):
name = playlist.get('username')
user_id = str(playlist.get('id'))
followings = self._get('me/followings.json?limit=60').get('collection')
for user in followings:
name = user.get('username')
user_id = str(user.get('id'))
logger.debug('Fetched user %s with id %s' % (
name, user_id
))
Expand Down
14 changes: 7 additions & 7 deletions tests/fixtures/sc-following.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ interactions:
Accept-Encoding: ['gzip, deflate']
Authorization: [!!python/unicode 'OAuth 1-35204-61921957-55796ebef403996']
Connection: [keep-alive]
User-Agent: [python-requests/2.4.3 CPython/2.7.8 Linux/3.16.0-28-generic]
User-Agent: [python-requests/2.9.1]
method: GET
uri: https://api.soundcloud.com:443/me/followings.json?limit=60&client_id=93e33e327fd8a9b77becd179652272e2
uri: https://api.soundcloud.com/me/followings.json?limit=60&client_id=93e33e327fd8a9b77becd179652272e2
response:
body:
string: !!binary |
H4sIAAAAAAAEA4uOBQApu0wNAgAAAA==
H4sIAAAAAAAAAKpWSs7PyUlNLsnMz1Oyio7VUcpLrSiJzyhKTVOyyivNyakFAAAA//8DADpGxs0i
AAAA
headers:
access-control-allow-headers: ['Accept, Authorization, Content-Type, Origin']
access-control-allow-methods: ['GET, PUT, POST, DELETE']
access-control-allow-origin: ['*']
access-control-expose-headers: [Date]
cache-control: ['private, max-age=0, must-revalidate']
content-encoding: [gzip]
content-length: ['22']
content-type: [application/json; charset=utf-8]
date: ['Fri, 02 Jan 2015 17:03:52 GMT']
etag: ['"d751713988987e9331980363e24189ce"']
content-length: ['60']
content-type: [application/json]
date: ['Fri, 19 Feb 2016 22:16:16 GMT']
server: [am/2]
status: {code: 200, message: OK}
version: 1

0 comments on commit 7848123

Please sign in to comment.