Skip to content

martin-laurent/api-client-python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Niland API Python Wrapper

Setup

To setup your project, follow these steps:

  1. Install Niland API Client using pip: pip install --upgrade git+git://github.com/niland/api-client-python@master.
  2. Next you'll have to initialize the client with your API-Key. You can find it on your Niland API account.
from nilandapi.client import Client

client = Client('YourAPIKey')

Quick Start

List tracks using pagination

data = client.get('tracks', {'page_size': 10, 'page': 2})

Retrieve a track by its reference

data = client.get('tracks/reference/YOUR_REFERENCE')

Find tracks by similarity and/or tags

data = client.get('tracks/search', {
    'similar_ids': [1234],
    'tag_ids': [21, 41]
})

Post a track

data = client.post('tracks', {
    'title': 'foobar',
    'artist': 'foobar',
    'reference': 'foobar',
    'tags': [21, 41],
    'audio': open('/path/to/your/audio/file.mp3', 'rb')
})

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%