Giter VIP home page Giter VIP logo

mopidy-webhooks's Introduction

Mopidy-Webhooks

Latest PyPI version

Number of PyPI downloads

Travis CI build status

Test coverage

Mopidy-Webhooks is a frontend extension for mopidy that sends webhook requests (regular JSON over HTTP POST requests) to a remote server. Mopidy-Webhooks sends a webhook any time mopidy core triggers an event, and also periodically sends player status updates to the remote server.

This is very much a work in progress. Please treat it as such and file issues where appropriate.

Installation

Install by running:

pip install Mopidy-Webhooks

Configuration

Before starting Mopidy, you must add configuration for Mopidy-Webhooks to your Mopidy configuration file:

[webhooks]
api_key = my-api-key                              ; optional
api_key_header_name = X-MOPIDY-WEBHOOKS-API-KEY   ; optional
status_update_interval = 5                        ; optional
webhook_url = http://localhost:8080/api/webhooks/ ; required

api_key if present, will be sent as a HTTP header using the key X-MOPIDY-WEBHOOKS-API-KEY. If you'd rather use a different header name, this can be customised with the configuration value api_key_header_name.

status_update_interval controls the interval between the sending of status update webhooks (in milliseconds). Set to 0 to disable the sending of periodic status updates. If you want continuous status updates, just use a very very small value.

webhook_url should be a URL (accessible to the mopidy client). The provided URL should accept HTTP POST requests, the body of which will contain JSON data. Requests will contain either periodic status updates (currently active track, playback state and time position) or JSON serialised event data emitted by Mopidy core.

Project resources

Changelog

v0.3.0 (UNRELEASED)

  • In progress.

v0.2.0

  • General refactoring
  • Small docs improvements

v0.1.0

  • Initial release.

mopidy-webhooks's People

Watchers

D avatar

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.