Skip to content

Commit

Permalink
Update client.py
Browse files Browse the repository at this point in the history
Group contributions are giving 404 errors with the appended `.json` extension, hence this crude hack.

Once this issue is fixed, we can remove this hack: https://github.com/soundcloud/soundcloud-python/issues/21
  • Loading branch information
woffleloffle committed Oct 1, 2013
1 parent 07a29be commit 3fa8110
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions soundcloud/client.py
Expand Up @@ -142,6 +142,8 @@ def _resolve_resource_name(self, name):
return '%s.json' % (name,)
return name
name = name.rstrip('/').lstrip('/')
if name[-13:] == 'contributions':
return '%s%s/%s' % (self.scheme, self.host, name)
return '%s%s/%s.json' % (self.scheme, self.host, name)

def _redirect_uri(self):
Expand Down

0 comments on commit 3fa8110

Please sign in to comment.