Visit the Rock, Paper, Scissors Game Site
Game Option for Pedro Player registering the round:
Game Option for Juana Player registering the round:
Retrieve all winners history.
GET https://gameofdronesapi-h7gshrfmc8g4cmbs.northeurope-01.azurewebsites.net/api/game/winners
Result:
[
{
"datePlayed": "2024-11-07T10:16:25.653",
"winnerId": 1,
"winnerName": "Pedro"
}
]
Retrieve all moves:
GET https://gameofdronesapi-h7gshrfmc8g4cmbs.northeurope-01.azurewebsites.net/api/game/moves
Result:
[
{
"kills": "Rock",
"moveId": 1,
"name": "Paper"
},
{
"kills": "Scissors",
"moveId": 2,
"name": "Rock"
},
{
"kills": "Paper",
"moveId": 3,
"name": "Scissors"
}
]
Create a new move:
POST https://gameofdronesapi-h7gshrfmc8g4cmbs.northeurope-01.azurewebsites.net/api/game/move
Example body:
{
"Name": "String",
"Kills": "Dog"
}
Result:
{
"kills": "Dog",
"moveId": 20,
"name": "String"
}
Update a move
PUT https://gameofdronesapi-h7gshrfmc8g4cmbs.northeurope-01.azurewebsites.net/api/game/move/{id}
Example:
PUT https://gameofdronesapi-h7gshrfmc8g4cmbs.northeurope-01.azurewebsites.net/api/game/move/20
Example body:
{
"Name": "Cadena",
"Kills": "Dog"
}
Result:
{
"kills": "Dog",
"moveId": 20,
"name": "Cadena"
}
Delete a move by ID:
DELETE https://gameofdronesapi-h7gshrfmc8g4cmbs.northeurope-01.azurewebsites.net/api/game/move/{id}
Example
DELETE https://gameofdronesapi-h7gshrfmc8g4cmbs.northeurope-01.azurewebsites.net/api/game/move/20
This project was generated with Angular CLI version 18.2.11.
npm install
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The application will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.
To avoid troubles with cors, change the port in the target of the api in the src/proxy.conf.json file:
{
"/api": {
"target": "http://localhost:5073",
"secure": false
}
}
Parametrize the url api on the src/environments/environment at apiUrl varieble: Example:
export const environment = {
apiUrl: 'http://localhost:5073/api/game'
};