Skip to content

Latest commit

 

History

History
46 lines (33 loc) · 2.03 KB

File metadata and controls

46 lines (33 loc) · 2.03 KB

REST-API-for-Koffee-Music-Player

A REST API prototype for Koffee Music Player. See original App

Add-ons

Download Postman Chrome extensions for easier HTTP requests.
Enable API key - locate dir/config/rest.php
Enable IP whitelisting - locate dir/config/rest.php

Operations

GET

User information

Information by artist

Recommendations

Discover songs

Top songs

Weekly trend of interactions

All Data

DELETE

Delete a song

PUT

Add new airplay

Methods

Name Return Value Description
*base_url*/users/*user_id* *integer* user_id - must be existing user id.
*base_url*/artist/*Taylor%20Swift* *string* artist - must be existing artist.
*base_url*/recommendation/*mood*/*username* *both string* mood + username - moods are pre-defined and must exist. See docs.
*base_url*/discovery/*username* *string* username - existing username.
*base_url*/top/*username* *string* username - existing username.
*base_url*/weekly_trend/*username* *string* username - existing username.
*base_url*/user_data/*mood*/*username* *both string* mood + username - moods are pre-defined and must exist.
*base_url*/song/*song_id* *integer* song_id - must be existing song id.
*base_url*/add_interactions/ key_val http body Must be x-www-form-urlencoded

Libarary

Thanks to codeigniter-restserver for making it easier.