Skip to content

Commit 9db0688

Browse files
committed
Readme added
1 parent 1984117 commit 9db0688

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
2+
# 1035-Deezer
3+
4+
_(This project is useless.)_
5+
6+
1035-Deezer serves as a DNS server which returns the current listening of a Deezer, a music streaming service, user.
7+
8+
9+
## How it works
10+
Due to limitations from the Deezer API, only the **last played music** will be returned, not the current one.
11+
Once logged, the Oauth user token will be stored in a Redis Database later access.
12+
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.
13+
A DNS response will be returned containing the last played title and it's performer.
14+
15+
## Utilization
16+
In theses examples, ``.dz.bb0.nl`` is the base domain and ``399552895`` is the user Deezer ID we are looking for.
17+
18+
### Login
19+
If the user access token isn't registered in the Redis database, an Oauth authorization URL will be returned
20+
21+
Example query :
22+
```
23+
❯ dig 399552895.dz.bb0.nl TXT +short
24+
"Can't get this user playing song."
25+
"User may not exist."
26+
"If that's you, connect the app to your Deezer account :"
27+
"https://connect.deezer.com/oauth/auth.php?app_id=529162&redirect_uri=https://1035.bb0.nl/callback&perms=listening_history,offline_access"
28+
```
29+
30+
### Request user
31+
Example query :
32+
```
33+
❯ dig 399552895.dz.bb0.nl TXT +short
34+
"Last played song : Kiminosei"
35+
"Author : the peggies"
36+
```
37+
## Installation
38+
DEB and RPM package are generated on each release.
39+
The configuration file is stored in ``/etc/1035-deezer/config.json``.
40+
A systemd service is provided as ``1035-deezer.service``.
41+
Proxying the HTTP endpoint is recommanded for TLS support.

0 commit comments

Comments
 (0)