RestAPI

Free & open source Rest API for YTDislike, read docs.ytdislike.com for implementing.

Todo

  • Add websockets

Installation

Git clone

git clone https://github.com/YTDislike/RestAPI

Install Mongodb

community edition

Install python requirements

pip3 install -r requirements.txt

Nginx

server {
	listen 127.0.0.1:8080;
	client_max_body_size 4G;

	chunked_transfer_encoding on;

	location / {
		proxy_redirect off;
		proxy_buffering off;
		proxy_pass http://uvicorn;
	}
}

upstream uvicorn {
	server unix:/tmp/uvicorn.sock;
}

Configure

run.py

import uvicorn

from YTDislike import YTDislike
from YTDislike.settings import GoogleOAuth

app = YTDislike(
    google_settings=GoogleOAuth(
        client_id="...",
        client_secret="..."
    )
)


if __name__ == "__main__":
    uvicorn.run(
        app,
        uds="/tmp/uvicorn.sock",
        log_level="error"
    )

Running

Use something like pm2 to run run.py in the background.

GitHub

View Github