/mixcloudpy

A Python wrapper for the Mixcloud API.

Primary LanguagePythonMIT LicenseMIT

Mixcloudpy

A Python wrapper for the Mixcloud API.

Getting Started

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']

Users

Get users by username:

user = mc.get_user('romeroqj')

Tags

Get tags by slug:

tag = mc.get_tag('house')

Or by name:

tag = mc.get_tag('House')

Artists

Get artists by slug:

artist = mc.get_artist('carl-cox')

Or by name:

artist = mc.get_artist('Carl Cox')

Cloudcasts

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')

Categories

Get categories by slug:

category = mc.get_category('tech-house')

Or by name:

category = mc.get_category('Tech House')

Authentication

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)

License

Copyright © 2014 Jorge Romero. Released under The MIT License.