Skip to content
Extraits de code Groupes Projets
Valider ba70db3f rédigé par Sybil's avatar Sybil
Parcourir les fichiers

Merge branch 'master' of https://github.com/Sybil/PlayBotAPI

parents b293d995 edf2512f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
== PlayBotAPI
= PlayBotAPI
== Abstract
PlayBotAPI delivers a json API communicating with PlayBot's database. This database contains music tracks and their metadata.
* Abstract
== PlayBot
PlayBot (https://github.com/erdnaxeli/PlayBot) is an awesome irc bot. Using it, people can share tracks' links through IRC channels.
All playbot data (users, music links, tags ...) are stored in an unique mysql database.
PlayBotAPI delivers a json API to communicate with PlayBot's database which contain music tracks and some metadata.
== PlayBotAPI
PlayBotAPI is coded in RoR (Rails) powered with some dreadful gems.
* PLayBot
=== Gems
* rails-api : Remove several major Rails middleware features to lighten the process and specialize it as an API.
* rack-cors : Open the API to different domain names.
* active_model_serializers : Tool to select and design the json data.
* composite_primary_keys : Add composite primary keys management to rails models.
PlayBot (https://github.com/erdnaxeli/PlayBot) is an awesome irc bot which enable people to easily manipulate music/video links through irc channels.
Each of these links are stored in an unique database which allows to handle favourites, reminders, exchange, tags ...
=== Routes
Prefix Verb URI Pattern Controller#Action
users GET /users(.:format) channels#index_users
tag_tracks GET /tags/:tag_id/tracks(.:format) tracks#index
tags GET /tags(.:format) tags#index
channel_tracks GET /channels/:channel_id/tracks(.:format) tracks#index
channels GET /channels(.:format) channels#index
user_tracks GET /users/:user_id/tracks(.:format) tracks#index
GET /users(.:format) users#index
tracks GET /tracks(.:format) tracks#index
track GET /tracks/:id(.:format) tracks#show
WebPlayBot is the link between these data and the non-irc user : helped by filters, integrated players, autonext ... you can listen all the tracks selected by enthousiasts geeks.
=== Example
https://api-playbot.skizzk.fr/tracks returns all the tracks saved in the database.
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter