GitXplorerGitXplorer
R

revanced-polling-api

public
13 stars
3 forks
7 issues

Commits

List of commits on branch main.
Unverified
39a64c3ff81342436eac7a9249ef7ebbd10ef0c4

hotfix: broken rate-limiter

aalexandreteles committed 2 years ago
Verified
8381b59dbf0819c67be5c419c1730632dfdacc5b

Merge pull request #72 from revanced/dev

aalexandreteles committed 2 years ago
Verified
92e7853e206d9184e730f742c8a2b64589bf83cc

fix: remove duplicate and invalid submissions [skip ci]

ooSumAtrIX committed 2 years ago
Unverified
0aa6d3481d0b7c9958582cef9f6e7eb1949b5d96

Merge branch 'dev'

aalexandreteles committed 2 years ago
Verified
36551f42be180225a9156bdcc1156a143ef15f98

fix: remove dupe icons

UUshie committed 2 years ago
Unverified
750d04b4ebd80a5e3d934d67b1303f4facec1bd2

Merge branch 'dev'

aalexandreteles committed 2 years ago

README

The README file for this repository.

ReVanced Polling API

We do a little polling ඞ

License: AGPLv3 GitHub last commit GitHub Workflow Status

This is a simple API that returns the latest ReVanced releases, patches and contributors.

Usage

The API is available at https://poll.revanced.app//

You can deploy your own instance by cloning this repository, editing the docker-compose.yml file to include your GitHub token and running docker-compose up or docker-compose up --build if you want to build the image locally instead of pulling from GHCR. Optionally you can run the application without Docker by running poetry install and poetry run ./run.sh. In this case, you'll also need a redis server and setup the following environment variables on your system.

Variable Description
REDIS_URL The hostname/IP of your redis server.
REDIS_PORT The port of your redis server.
HYPERCORN_HOST The hostname/IP of the API.
HYPERCORN_PORT The port of the API.
SENTRY_DSN The DSN of your Sentry instance.
CLIENT_ID The ID to be used by your auth client.
CLIENT_SECRET The secret to be used by your auth client.
SECRET_KEY The key used to encrypt your PASETO tokens.

Please note that there are no default values for any of these variables.

If you don't have a Sentry instance, we recommend using GlitchTip.

API Endpoints

  • logos - Returns all the logos submited to evaluation
  • ballot - Casts a ballot on the logo polling

Authentication

The API uses PASETO tokens for authorization. To authenticate, you need to send a POST request to /auth with the following JSON body:

{
  "id": "your_client_id",
  "secret": "your_client_secret",
  "discord_id_hash": "your_discord_id_hash"
}

The API will answer with a PASETO token that you can use to authorize your requests. You can use the token in the Authorization header of your requests, like this:

Authorization: Bearer <token>

That token will be valid for 5 minutes. After that, you'll need to generate a new one.

Contributing

If you want to contribute to this project, feel free to open a pull request or an issue. We don't do much here, so it's pretty easy to contribute.

License

This project is licensed under the AGPLv3 License - see the LICENSE file for details.