Duo Match API
A simple API made with Node, Express, TypeScript, Prisma, Cors, SQLite in dev ambient responsible to do all connections of players and yours games.
Front-end Repo:
https://github.com/jovimoura/duoMatch-app
API Doc.
Create Ad(Announcement game)
POST /games/${game-id}/ads
Param |
Type |
Description |
name |
string |
Mandatory. Name of player |
Param |
Type |
Description |
yearsPlaying |
number |
Optional. Years the player has played the game |
Type |
Type |
Description |
discord |
string |
Optional. Discord of the player |
Type |
Type |
Description |
weekDays |
[number] |
Mandatory. Days of the week the player plays |
Type |
Type |
Description |
hourStart |
string |
Mandatory. Start time |
Type |
Type |
Description |
hourEnd |
string |
Mandatory. Finish time |
Type |
Type |
Description |
useVoiceChannel |
boolean |
Optional. |
If the player uses the microphone |
|
|
Get Ad Player(Announcement game)
GET /ads/${game-id}/discord
Response:
{
"discord": "Example discord Name"
}
Get Games
Response:
[
{
"id": "<id-game>",
"title": "League of Legends",
"bannerUrl": "<image-banner>",
"_count": {
"ads": 0
}
},...
]
Get Games Ads (All announcenents of one game)
Response:
[
{
"id": "<id-player>",
"name": "Jovimoura",
"weekDays": [
"0",
"5",
"6"
],
"useVoiceChannel": true,
"yearsPlaying": 2,
"hourStart": "12:0",
"hourEnd": "15:0"
},...
]
Installation
Clone
git clone https://github.com/jovimoura/duoMatch-api
Access the folder
Install dependencies
Start the app
Port:
Tecnologies and Libs:
- Node
- Express
- TypeScript
- Prisma
- Cors
Made by:
João Victor dos Santos Moura