POST audio/create
Create a audio track.
URL:
http://mobileroadie.com/api/audio/create
Formats
XML, JSON, HTML
Requirements
SSL, API Secret, White-Listed IP Address
HTTP Method(s):
POST
URL Parameter(s):
-
key
-
Required
-
POST Parameters:
-
secret
-
Required.
-
-
artist
-
Required. Artist Name or Performer
-
-
title
-
Required. Song name or Title
-
-
album
-
Album Name
-
-
label
-
Record Label
-
-
url
-
URL to purchase for iPhone apps.
-
-
7digital
-
URL to purchase for Android apps (7digital or other URL).
-
-
description
-
Track description. Usually contains credits.
-
-
Lyrics
-
Lyrics of the track.
-
-
autoplay
-
Required. Flag to have the track play on app startup. 0 or 1
-
-
img
-
Required. URL to cover art image. Auto-Cropped to 480×480
-
-
sequence
-
Required. Must be a natural, positive number (0, 1, 2, 3, etc.), which will be used to determine the display order. The numbers do not need to be unique, so if sort order is not important the same number can be used for each entry.
-
-
content_url
-
Required. URL to a mp3 audio file. Must be below 96kbps bitrate.
-
-
category_id
-
Category ID to assign to this content
-
Usage Example
<?php $data = array( 'secret' => 'your_secret_key', 'artist' => 'The Bloody Beetroots', 'title' => 'Butter', 'album' => 'Rombo EP', 'label' => 'DIM MAK', 'url' => 'http://itunes.apple.com/us/artist/the-bloody-beetroots/id266798981', 'img' => 'http://url.for.img', 'description' => 'A rad song.', 'lyrics' => 'La La La La La', 'autoplay' => '1', 'sequence' => '10', 'content_url' => 'http://myserve.com/path/to/audio.mp3', ); $handle = curl_init("https://mobileroadie.com/api/audio/create/key/4d4ba30d73b77f7"); curl_setopt($handle, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_setopt($handle, CURLOPT_POST, true); curl_setopt($handle, CURLOPT_POSTFIELDS, $data); $response = curl_exec($handle); curl_close($handle); ?>
Success Response
<xml> <id>1234567890</id> </xml>
Response when Missing Required Fields
<xml> <error>[FieldName1] is required. [FieldNameX] is required.</error> </xml>
Comments
0 comments
Please sign in to leave a comment.