All URIs are relative to http://localhost:3000/api
Method | HTTP request | Description |
---|---|---|
getPlayer | GET /player | Get Player |
postMoves | POST /moves | Create Move |
InlineResponse202 getPlayer()
Get Player
Get player information
import GameClient from 'game-client';
let defaultClient = GameClient.ApiClient.instance;
// Configure Bearer access token for authorization: token
let token = defaultClient.authentications['token'];
token.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GameClient.GameApi();
apiInstance.getPlayer().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
InlineResponse202 postMoves(direction)
Create Move
Create a player move
import GameClient from 'game-client';
let defaultClient = GameClient.ApiClient.instance;
// Configure Bearer access token for authorization: token
let token = defaultClient.authentications['token'];
token.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new GameClient.GameApi();
let direction = "direction_example"; // String | The direction to move
apiInstance.postMoves(direction).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
direction | String | The direction to move |
- Content-Type: Not defined
- Accept: application/json