Advertisement
Guest User

Untitled

a guest
Aug 10th, 2015
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.48 KB | None | 0 0
  1. FORMAT: 1A
  2. HOST: http://api-core.earbits.com/
  3. # Earbits API
  4.  
  5. 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.
  6.  
  7.  
  8.  
  9. ## Group Session
  10.  
  11. ## Session [/session]
  12.  
  13.  
  14.  
  15. ### Status [GET]
  16.  
  17. + Response 200 (application/json)
  18.  
  19. + Attributes (User)
  20.  
  21. ### Login [POST]
  22. + Request (application/json)
  23.  
  24. {
  25. "email": "thomasalwyndavis@gmail.com",
  26. "password": ""
  27. }
  28.  
  29. + Response 200 (application/json)
  30.  
  31. + Attributes (User)
  32.  
  33.  
  34. ### Logout [DELETE]
  35.  
  36. + Response 200 (application/json)
  37.  
  38. {
  39. "auth": false
  40. }
  41. ## Users [/users]
  42.  
  43. ### Register [POST]
  44.  
  45. After successfully registering, users are also automatically logged in
  46.  
  47. + Request (application/json)
  48.  
  49. {
  50. "email": "thomasalwyndavis@gmail.com",
  51. "password": ""
  52. }
  53.  
  54. + Response 200 (application/json)
  55.  
  56. + Attributes (User)
  57.  
  58. ## Artists [/artists]
  59.  
  60. Get a list of all artist
  61.  
  62. + Attributes (array[Artist])
  63.  
  64. ### List [GET]
  65.  
  66.  
  67. + Response 200 (application/json)
  68.  
  69. + Attributes (array[Artist])
  70.  
  71. ## Group Playlists
  72.  
  73.  
  74. Resources related to playlists in the API. Playlst related calls must be **authenticated**
  75.  
  76.  
  77. ## Playlist [/playlists/{playlist_id}]
  78.  
  79. A Playlist object has the following attributes:
  80.  
  81. + name
  82. + created_at - An ISO8601 date when the question was published.
  83.  
  84. + Parameters
  85. + playlist_id: 559c0660308aa04b97000001 (required, string) - ID of the playform in form of an MongoDb id
  86.  
  87.  
  88. ### View [GET]
  89.  
  90. + Response 200 (application/json)
  91.  
  92. {
  93. "name": "Yotam's Classics",
  94. "created_at": "2014-11-11T08:40:51.620Z"
  95. }
  96.  
  97. ### Update [PUT]
  98.  
  99. + Response 200 (application/json)
  100.  
  101. {
  102. "name": "Yotam's New Music",
  103. "created_at": "2014-11-11T08:40:51.620Z"
  104. }
  105.  
  106. ### Delete [DELETE]
  107.  
  108. + Response 200 (application/json)
  109.  
  110. { "message": "success" }
  111.  
  112. ## Playlists [/playlists]
  113.  
  114. ### View all [GET]
  115.  
  116. + Response 200 (application/json)
  117.  
  118. [{
  119. "name": "Yotam's Classics",
  120. "created_at": "2014-11-11T08:40:51.620Z"
  121. }]
  122.  
  123. ### Create [POST]
  124.  
  125. + Response 200 (application/json)
  126.  
  127. [{
  128. "name": "Yotam's Classics",
  129. "created_at": "2014-11-11T08:40:51.620Z"
  130. }]
  131.  
  132. ## Playlist Tracks [/playlists/{playlist_id}/tracks]
  133.  
  134. ### View all [GET]
  135.  
  136. + Response 200 (application/json)
  137.  
  138. [{
  139. "name": "Misery",
  140. "created_at": "2014-11-11T08:40:51.620Z"
  141. }]
  142.  
  143. ### Create [POST]
  144.  
  145. + Response 200 (application/json)
  146.  
  147. [{
  148. "name": "Angelic",
  149. "created_at": "2014-11-11T08:40:51.620Z"
  150. }]
  151. ### Delete [DELETE]
  152.  
  153. + Response 200 (application/json)
  154.  
  155. [{
  156. "name": "Angelic",
  157. "created_at": "2014-11-11T08:40:51.620Z"
  158. }]
  159.  
  160. # Data Structures
  161.  
  162. ## Artist (object)
  163.  
  164. + id: '517aa64799f25702de003b86' (string)
  165. + name: 'Meg Myers' (string)
  166.  
  167. ## User (object)
  168.  
  169. + id: '517aa64799f25702de003b86' (string)
  170. + email: 'thomasalwyndavis@gmail.com' (string)
  171. + first_name: 'Thomas' (string)
  172. + last_name: 'Davis' (string)
  173. + created_at: '2013-04-26 16:07:36 UTC' (string)
  174. + avatar_url: 'http://some.com/omg.png' (string)
  175. + groovie_counts: 66 (object)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement