Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tomdionysus/rageagain-api
A RESTful API for the RAGEagain data by Patrick Galbraith
https://github.com/tomdionysus/rageagain-api
Last synced: about 2 months ago
JSON representation
A RESTful API for the RAGEagain data by Patrick Galbraith
- Host: GitHub
- URL: https://github.com/tomdionysus/rageagain-api
- Owner: tomdionysus
- Created: 2013-10-17T06:16:59.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2013-10-18T06:23:21.000Z (about 11 years ago)
- Last Synced: 2024-04-12T16:08:55.964Z (9 months ago)
- Language: Ruby
- Size: 4.09 MB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
RAGEagain Server
================# Introduction
A RESTful API for the RAGEagain dataset by [Patrick Galbraith](http://www.pjgalbraith.com).
# Entity Resources
All Resources support GET,PUT,POST,DELETE
* /tracks
* /artists
* /playlists
* /labelsRAGEagain is based on the ```crud-service``` gem, and supports all query/relational URL params as detailed [here](https://github.com/tomcully/crud-service)
# Authorization
POST,PUT and DELETE require HMAC authorization, similar to the Amazon AWS api.
You should supply an Authorization header:
Authorization: HMAC user:hmac_hash
The HMAC key is set in the HMAC_SHARED_SECRET environment variable. For client requests, the hash is the base64 encoded HMAC-SHA1 of "#{verb}:#{path}:#{MD5(body)}:#{UTC_date(YYYYMMDD)}" with the shared secret as the key, e.g.:
HMAC_SHARED_SECRET: fOiFYoR22odgbjKsDHcQdkfiLErjGa8r
Verb: POST
Path: /artists
Body: {"name":"Danger Will Robinson"}
MD5 Body: 6c623b354d22cb960c7904169317f6da
UTC Date: 20131009To Hash: POST:/artists:6c623b354d22cb960c7904169317f6da:20131009
Base64 HMAC-SHA1: Z2zNW8Ew9hYMKl02WkYQ+hZaL+o=Header: Authorization: HMAC public:Z2zNW8Ew9hYMKl02WkYQ+hZaL+o=
The *user* parameter is currently ignored.
# ENV config
* CLEARDB_DATABASE_URL - mysql2://*username:password*@*host:port/dbname*
* MEMCACHIER_SERVERS - *memcachier hosts*
* MEMCACHIER_USERNAME - *memcachier username*
* MEMCACHIER_PASSWORD - *memcachier password*
* HMAC_SHARED_SECRET - *HMAC shared secret for POST,PUT,DELETE*Memcache is optional and will only be used if configured.
# Credits
Created by [@tomdionysus](http://www.twitter.com/tomdionysus)
Based on data from [RAGEagain](http://www.pjgalbraith.com/2012/08/rageagain) by [Patrick Galbraith](http://www.pjgalbraith.com)