Giter Site home page Giter Site logo

1035-deezer's Introduction

1035-Deezer

(This project is useless.)

1035-Deezer serves as a DNS server which returns the current listening of a Deezer, a music streaming service, user.

How it works

Due to limitations from the Deezer API, only the last played music will be returned, not the current one.
Once logged, the Oauth user token will be stored in a Redis Database later access. When a DNS TXT query will be asked to the server, the software will lookup the Redis server, get the user token and perform an API call to the history endpoint of the Deezer API. A DNS response will be returned containing the last played title and it's performer.

Utilization

In theses examples, .dz.bb0.nl is the base domain and 399552895 is the user Deezer ID we are looking for.

Login

If the user access token isn't registered in the Redis database, an Oauth authorization URL will be returned over DNS.

Once logged, you will also get your Deezer user ID.

Example query :

❯ dig 399552895.dz.bb0.nl  TXT +short
"Can't get this user playing song."
"User may not exist."
"If that's you, connect the app to your Deezer account :"
"https://connect.deezer.com/oauth/auth.php?app_id=529162&redirect_uri=https://1035.bb0.nl/callback&perms=listening_history,offline_access"

Request user

Example query :

❯ dig 399552895.dz.bb0.nl  TXT +short
"Last played song : Kiminosei"
"Author : the peggies"

Installation

DEB and RPM package are generated on each release. The configuration file is stored in /etc/1035-deezer/config.json. A systemd service is provided as 1035-deezer.service. Proxying the HTTP endpoint is recommanded for TLS support.

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.