Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FORMAT: 1A
- HOST: http://api-core.earbits.com/
- # Earbits API
- The API is responsible for all requests made from mobile devices. It is used for authentication, playlists, requesting tracks, listing channels and everything else in between.
- ## Group Session
- ## Session [/session]
- ### Status [GET]
- + Response 200 (application/json)
- + Attributes (User)
- ### Login [POST]
- + Request (application/json)
- {
- "email": "thomasalwyndavis@gmail.com",
- "password": ""
- }
- + Response 200 (application/json)
- + Attributes (User)
- ### Logout [DELETE]
- + Response 200 (application/json)
- {
- "auth": false
- }
- ## Users [/users]
- ### Register [POST]
- After successfully registering, users are also automatically logged in
- + Request (application/json)
- {
- "email": "thomasalwyndavis@gmail.com",
- "password": ""
- }
- + Response 200 (application/json)
- + Attributes (User)
- ## Artists [/artists]
- Get a list of all artist
- + Attributes (array[Artist])
- ### List [GET]
- + Response 200 (application/json)
- + Attributes (array[Artist])
- ## Group Playlists
- Resources related to playlists in the API. Playlst related calls must be **authenticated**
- ## Playlist [/playlists/{playlist_id}]
- A Playlist object has the following attributes:
- + name
- + created_at - An ISO8601 date when the question was published.
- + Parameters
- + playlist_id: 559c0660308aa04b97000001 (required, string) - ID of the playform in form of an MongoDb id
- ### View [GET]
- + Response 200 (application/json)
- {
- "name": "Yotam's Classics",
- "created_at": "2014-11-11T08:40:51.620Z"
- }
- ### Update [PUT]
- + Response 200 (application/json)
- {
- "name": "Yotam's New Music",
- "created_at": "2014-11-11T08:40:51.620Z"
- }
- ### Delete [DELETE]
- + Response 200 (application/json)
- { "message": "success" }
- ## Playlists [/playlists]
- ### View all [GET]
- + Response 200 (application/json)
- [{
- "name": "Yotam's Classics",
- "created_at": "2014-11-11T08:40:51.620Z"
- }]
- ### Create [POST]
- + Response 200 (application/json)
- [{
- "name": "Yotam's Classics",
- "created_at": "2014-11-11T08:40:51.620Z"
- }]
- ## Playlist Tracks [/playlists/{playlist_id}/tracks]
- ### View all [GET]
- + Response 200 (application/json)
- [{
- "name": "Misery",
- "created_at": "2014-11-11T08:40:51.620Z"
- }]
- ### Create [POST]
- + Response 200 (application/json)
- [{
- "name": "Angelic",
- "created_at": "2014-11-11T08:40:51.620Z"
- }]
- ### Delete [DELETE]
- + Response 200 (application/json)
- [{
- "name": "Angelic",
- "created_at": "2014-11-11T08:40:51.620Z"
- }]
- # Data Structures
- ## Artist (object)
- + id: '517aa64799f25702de003b86' (string)
- + name: 'Meg Myers' (string)
- ## User (object)
- + id: '517aa64799f25702de003b86' (string)
- + email: 'thomasalwyndavis@gmail.com' (string)
- + first_name: 'Thomas' (string)
- + last_name: 'Davis' (string)
- + created_at: '2013-04-26 16:07:36 UTC' (string)
- + avatar_url: 'http://some.com/omg.png' (string)
- + groovie_counts: 66 (object)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement