Git Product home page Git Product logo

espop's Introduction

espop - Erlang client library for spop

This is a client library written in erlang to interface with the excellent spop server http://github.com/Schnouki/spop. It support all current commands of the spopd server. See the facade, espop.erl, for documentation and specs.

Installation

  • Use rebar (not included) to build
  • There are no dependencies to download

Example usage

1> espop:start().
ok
2> rr(espop).
[album,artist,offline_status,playlist,playlist_info,
 playlist_ref,query_response,status,track,uri_info]
3> espop:find("Throne").
1 - Game of Thrones - Best of Seasons 1, 2 & 3
156 - Ramin Djawadi โ€“ Game Of Thrones
4> espop:play(1)
#status{status = <<"playing">>,repeat = false,
         shuffle = false,total_tracks = 19,current_track = 1,
         artist = <<"L'Orchestra Cinematique">>,
         title = <<"The King's Arrival (from Game of Thrones - Season 1)">>,
         album = <<"Game of Thrones - Best of Seasons 1, 2 & 3">>,
         duration = 216000,position = 0.371,
         uri = <<"spotify:track:4tJqf2Cc9JP77Z984hJdYl">>,
         popularity = 45}

For the above to work, the spopd server must be running at localhost:6602.

Set the application environment variables 'host' and 'port' to change which server to talk to.

License

Apache license version 2.0. See the LICENSE file for details.

The file src/rfc4627.erl is excluded from this license and is borrowed from http://github.com/tonyg/erlang-rfc4627. See this file for copyright and license details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.