A simple API made with Node, Express, TypeScript, Prisma, Cors, SQLite in dev ambient responsible to do all connections of players and yours games.
https://github.com/jovimoura/duoMatch-app
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 /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/{game-id}/ads
Response:
[
{
"id": "<id-player>",
"name": "Jovimoura",
"weekDays": [
"0",
"5",
"6"
],
"useVoiceChannel": true,
"yearsPlaying": 2,
"hourStart": "12:0",
"hourEnd": "15:0"
},...
]
git clone https://github.com/jovimoura/duoMatch-api
cd <name-folder>
npm i
npm run dev
http://localhost:3333/
- Node
- Express
- TypeScript
- Prisma
- Cors