A Python wrapper for the Mixcloud API.
All methods are available thorugh the Mixcloud
class:
import mixcloud
mc = mixcloud.Mixcloud()
All result sets are Python dictionaries:
house_tag = mc.get_tag('house')
house_tag.keys() # [u'url', u'name', u'key']
Get users by username:
user = mc.get_user('romeroqj')
Get tags by slug:
tag = mc.get_tag('house')
Or by name:
tag = mc.get_tag('House')
Get artists by slug:
artist = mc.get_artist('carl-cox')
Or by name:
artist = mc.get_artist('Carl Cox')
Cloudcasts belong to users, so the username must be passed as argument:
cloudcast = mc.get_cloudcast('spartacus', 'party-time')
Cloudcast's identifier can also be a name:
cloudcast = mc.get_cloudcast('spartacus', 'Party Time')
Get categories by slug:
category = mc.get_category('tech-house')
Or by name:
category = mc.get_category('Tech House')
For the time being, authentication is only possible through the browser.
This wrapper provides a method so you redirect your users to the Mixcloud authorization dialog.
auth_dialog_uri = mc.get_oauth_uri(client_id, redirect_uri)
Copyright © 2014 Jorge Romero. Released under The MIT License.