SocPlay API

API v2 : disini


Endpoint URL

http://socplay.net/api/v1/

Methods

POST: /user

Post/update user's Twitter access token

Parameters

POST: /song

Submit a song played by user and (optionally) tweet the #np using user's Twitter account

Parameters

"data" Parameter JSON example

{
  "title": "Where'd You Go",
  "artist": "Fort Minor",
  "album": "The Rising Tied",
  "comment": "[insert curhat here]"
}
		

album and comment fields are optional

Sample Response

{
  "code": 200,
  "data": {
    "message": "Song succesfully submitted",
    "song_id": 288,
    "song_url": "http://socplay.net/akhy/s/288/fort-minor-where-d-you-go",
    "song_shorturl": "http://hore.in/3f32"
  }
}
		

Response with code >= 400 are considered failed request, otherwise success.

POST: /playlist

Submit a playlist and (optionally) tweet the playlist using user's Twitter account

Parameters

"data" Parameter JSON example (playlist)

[
	{
	  "title": "Where'd You Go",
	  "artist": "Fort Minor",
	  "album": "The Rising Tied"
	},
	{
	  "title": "The Reason",
	  "artist": "Hoobastank"
	},
	{
	  "title": "Bad Day",
	  "artist": "Daniel Powter"
	}
]
		

Sample Response

{
  "code": 200,
  "data": {
    "message": "Playlist succesfully submitted",
    "playlist_id": 33,
    "playlist_url": "http://socplay.net/akhy/p/33/lagu-galau",
    "playlist_shorturl": "http://hore.in/36b"
  }
}
		

Response with code >= 400 are considered failed request, otherwise success.