API Docs

Overview

The RjDj API is located at http://api.rjdj.me.

The current version is 0.4.

URI Schema

/<contenttype>/<order>?<arguments>

Arguments are optional and can be filters, limiters or a callback (for JSON-P).

Content Types

  • recordings (Recordings uploaded by users through the RJDJ Client)
  • scenes (Scenes available for download)

More coming soon!

Limiters

  • limit (Integer, default:20, Limits the amount of the result set.)
  • offset (Integer, default:0, Offset at which the query should start. This is useful when you have more results than the limit.)

JSON-P

  • callback (String, Name of the callback that should be called.)

With JSON-P you can specify a callback function (for cross-domain JavaScript?) in which the result set gets wrapped. For more information see http://en.wikipedia.org/wiki/JSON#JSONP

Recordings

Access Policy

  • Public
  • No Authentication
  • Read-only

Content Type

  • recordings

Order

  • recent (creation date, descending)
  • popular (like count, descending)
  • mostplayed (play count, descending)

Filters

  • id (Integer, unique id of the recording)
  • id[from] (Integer, recordings with same or greater id)
  • id[to] (Integer, recordings with the same or lower id)
  • c_time[from] (Unix Timestamp, recordings since this time)
  • c_time[to] (Unix Timestamp, recordings until this time)
  • owner (String, name of the user who created the recording)
  • owner_id (Integer, unique id of the user who created the recording)
  • scene (String, name of the scene with which the recording was created)
  • scene_id (Integer, unique id of the scene with which the recording was created)

Example

You want to get the most played recordings made with the scene CanOfBeats wrapped in a callback function:

http://api.rjdj.me/recordings/mostplayed?scene=CanOfBeats&callback=me.rjdj.callback

Result:

me.rjdj.callback({
    "response_text": "OK", 
    "version": "0.4-0", 
    "contenttype": "Recording", 
    "status_code": 200, 
    "total": 2436, 
    "results": [
        {
            "stats": {
                "play_count": 1333, 
                "like_count": 2
            }, 
            "description": "", 
            "title": "Nov 18, 2009 10:45 PM", 
            "id": 28603, 
            "c_time": 1258606117, 
            "scene": {
                "id": 33, 
                "title": "CanOfBeats"
            }, 
            "owner": {
                "username": "anonymous_srygijfo", 
                "displayname": "RjDj user", 
                "id": 57314
            }, 
            "uri": "http://rjdj.me/recording/28603/", 
            "scene_name": "", 
            "length": 98, 
            "download": "http://rjdj.me/recording/download/recording-28603.mp3?action=download", 
            "geopath": [], 
            "subject": null
        }
})

Scenes

Access Policy

  • Public
  • No Authentication
  • Read-only

Content Type

  • scenes

Order

  • recent (creation date, descending)

Filters

  • id (Integer, unique id of the scene)
  • name (String, name of the scene)
  • artist (String, name of the artist who created the scene)
  • price[from] (Integer, price of the scene in Euro Cents)
  • price[to] (Integer, price of the scene in Euro Cents)

Example

You want to get the latest 2 scenes which price is between 1 and 2 Euros:

http://api.rjdj.me/scenes/recent?price[from]=100&price[to]=200&limit=2

Result:

{
    "response_text": "OK", 
    "version": "0.4-0", 
    "contenttype": "Scene", 
    "status_code": 200, 
    "total": 26, 
    "results": [
        {
            "description": "Control the music by making hard sounds and lift off to infinity ! or sink back into a bath of genereactive sonic heaven ...   for K   ...   please email dizzybanjo@gmail.com with feedback or suggestions of what you would like in future scenes :)", 
            "title": "Ascend", 
            "price": 199, 
            "c_time": 1263373428, 
            "uri": "http://rjdj.me/music/Dizzy%20Banjo/Ascend/", 
            "id": 104, 
            "featured": true, 
            "artist": {
                "website": "http://dizzybanjo.wordpress.com/", 
                "name": "Dizzy Banjo", 
                "description": "Hello World!"
            }, 
            "image": "https://rjdj-production-scenes.s3.amazonaws.com:443/scenefiles/Dizzy%20Banjo-Ascend.rjz-128.png?Signature=IjYzJQhYXscOaQov7kfwu%2Fh%2FLVs%3D&Expires=1299175856&AWSAccessKeyId=0DWWGT2HPZVT8T1GB2G2"
        }, 
        {
            "description": "The first in a series of pieces inspired by composer John Oswald's Plunderphonics. Mic input and accelerometer motion are used.", 
            "title": "Oswald", 
            "price": 199, 
            "c_time": 1262946725, 
            "uri": "http://rjdj.me/music/pharmacopia/Oswald/", 
            "id": 98, 
            "featured": false, 
            "artist": {
                "website": "", 
                "name": "pharmacopia", 
                "description": "Hello World!"
            }, 
            "image": "https://rjdj-production-scenes.s3.amazonaws.com:443/scenefiles/pharmacopia-Oswald.rjz-128.png?Signature=WfiFJoPEdZDNnjcP22q7UXYUbf8%3D&Expires=1299175856&AWSAccessKeyId=0DWWGT2HPZVT8T1GB2G2"
        }
    ]
}