GithubHelp home page GithubHelp logo

q-bot-api's Introduction

Q-bot-api

Setup Instructions

initalise npm npm init -y

install typescript npm install typescript --save-dev

install dependencies npm i knex mysql2 dotenv express @types/express @types/node rimraf

create knexfile.ts npx knex init -x ts

create table npx knex migrate:make <migration_file_name>

migrate table to mysql database npm run migrate or npx knex migrate:latest

Account routes

Method Endpoint (http://localhost:8080) Request Body Description
GET /api/accounts / Retrieve list of all users
GET /api/accounts/:discord_id / Retrieve all Riot and Steam accounts of the user
POST /api/accounts { discord_id: string, tag: string } Create a new user account
GET /api/accounts/riot/is_duplicate { discord_id: string , riot_id: string } Return true if there's a duplicate Riot account
POST /api/accounts/riot/add { discord_id: string, riot_id: string, region: string, rank: string, active: boolean } Create a new Riot account
POST /api/accounts/steam/add
GET /api/accounts/riot/get/:discord_id / Retrieve all Riot accounts of the user
PATCH /api/accounts/riot/select { discord_id: string , riot_id: string } Set the selected Riot account active
GET /api/accounts/steam/get/:discord_id / Retrieve all Steam accounts of the user
PATCH /api/accounts/steam/select { discord_id: string , steam_id: string } Set the selected Steam account active
DELETE /api/accounts/riot/delete { discord_id: string , riot_id: string } Delete the selected Riot Account
DELETE /api/accounts/steam/delete { discord_id: string , steam_id: string } Delete the selected Steam Account

Valorant routes

Method Endpoint (http://localhost:8080) Request Body Description
GET /api/valorant/active/get/:discord_id / Retrieve an active riot account
PATCH /api/valorant/active/update { discord_id: string, rank: number } Update a riot account information

q-bot-api's People

Contributors

leightonguang avatar

Watchers

 avatar

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.