api-v2
🌎 The new API server for Quaver.
api-v2 is the most up-to-date (v2) and open source version of the Quaver web API.
As endpoints are made available in v2, it is recommended to use them instead of its v1 counterpart, as v1 will be deprecated, as we begin to update usage in-game and on our website.
This application is being developed for internal network use. As such, no support will be provided for the usage of this software.
Requirements
- Go 1.22
- MariaDB / MySQL
- Redis
- ElasticSearch 8.14.1
- Steam Publisher API Key
- OpenAI API Key
- FFmpeg
- Compiled Quaver.Tools Executable
- Stripe CLI (for donations/store item development/testing)
- Postman (for testing)
Setup
- Install
Go 1.22
or later.
- Clone the repository.
- Copy
config.example.json
and make a file named config.json
- Fill out the config file with the appropriate details.
- Note:
quaver_tools_path
is the path to the Quaver.Tools executable, not the directory.
- Navigate to the
/cmd/api/
directory.
- Start the server with
go run .
or your method of choice.
- The server is now available at
http://localhost:8080
(or your desired port).
Testing
Request handlers can be tested through Postman.
Some endpoints require authentication. To access them, you must generate a JWT, and set it in the variables
section of the Postman collection.
Example JWT Payload
{
"user_id": 2,
"username": "QuaverBot",
"iat": 1516239022
}
LICENSE
This software is licensed under the GNU Affero General Public License v3.0. Please see the LICENSE file for more information.