Featured News

Introducing the Audiofarm Data API (ADA)

3 February 2008

We just launched the Audiofarm Data API (ADA). This makes online information about people, connections and audio files easily available and useful for developers. Developers can query this public information to offer their users dramatically streamlined functionality and other useful features.

Audiofarm Data API Documentation (ADA)

This version:
http://audiofarm.org/home/developer
Audiofarm Data API (ADA) Vocabulary Specification:
http://audiofarm.org/home/rdf_specs
Authors:
Konstantinos Gerodimos

Contents

Audience

This document is intended for programmers who want to write client applications that can interact with Audiofarm. It provides examples of basic operations using raw HTTP and XML, with explanations.

This document assumes that you understand the general ideas behind the HTML, XML, RDF APIs protocol. Since none of the feeds described in this document require authentication, you can try them out using your favorite browser. If you're using a UNIX system and want to see the raw feeds, you may find the UNIX command-line utilities curl or wget useful. For more information, see the manual pages for these utilities.

Retrieving audio file feeds

The Audiofarm Data API (ADA) provides numerous feeds that return a list of audio files, such as standard feeds, related audio files, user's audio files. For example, the user's audio files feed returns all audio files uploaded by a specific user. All the feeds described in this section are "audio file feeds"—feeds that return lists of audio files.

When you send that GET request, Audiofarm returns an HTTP 200 OK status code and a feed containing all the audio files that match the request.

Retrieving audio files uploaded by a user

To retrieve the list of audio files uploaded by a user send an HTTP GET to the following URL. Querying a Audiofarm feed does not require authentication.

GET http://audiofarm.org/[login name]/api/audiofiles

Retrieving a single audio file

To retrieve a signle audio file send an HTTP GET to the following URL.

GET http://audiofarm.org/[audio file ID]/api/audiofile

To retrieve related audio files for an audio file ID send an HTTP GET to the following URL.

GET http://audiofarm.org/[audio file ID]/api/audiofile/related

Retrieving the charts

To retrieve the daily or weekly charts send an HTTP GET to the following URL.

GET http://audiofarm.org/[daily|weekly]/api/audiofiles/charts/[all|genre]

Search audio files

To retrieve the result of search query send an HTTP GET to the following URL.

GET http://audiofarm.org/[query]/api/audiofiles/search

To retrieve featured send an HTTP GET to the following URL.

GET http://audiofarm.org/api/audiofiles/featured/[all|genre]

Most Recent audio files

To retrieve most recent send an HTTP GET to the following URL.

GET http://audiofarm.org/api/audiofiles/most_recent/[all|genre]

Most Liked audio files

To retrieve most liked send an HTTP GET to the following URL.

GET http://audiofarm.org/api/audiofiles/most_liked/[all|genre]

Genres

To retrieve all genres send an HTTP GET to the following URL.

GET http://audiofarm.org/api/genres

The Friend of a Friend (FOAF)

The Friend of a Friend (FOAF) project is creating a Web of machine-readable pages describing people, the links between them and the things they create and do. [ read more here. ]

Retrieving (FOAF) user information

To retrieve information for a user "stereofloat" send an HTTP GET to the following URL.

GET http://audiofarm.org/[login name].xml