All URIs are relative to http://localhost:3000/api
Method | HTTP request | Description |
---|---|---|
get_player | GET /player | Get Player |
post_moves | POST /moves | Create Move |
InlineResponse202 get_player
Get Player
Get player information
# load the gem
require 'game-client'
# setup authorization
GameClient.configure do |config|
# Configure Bearer authorization: token
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = GameClient::GameApi.new
begin
#Get Player
result = api_instance.get_player
p result
rescue GameClient::ApiError => e
puts "Exception when calling GameApi->get_player: #{e}"
end
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
InlineResponse202 post_moves(direction)
Create Move
Create a player move
# load the gem
require 'game-client'
# setup authorization
GameClient.configure do |config|
# Configure Bearer authorization: token
config.access_token = 'YOUR_BEARER_TOKEN'
end
api_instance = GameClient::GameApi.new
direction = 'direction_example' # String | The direction to move
begin
#Create Move
result = api_instance.post_moves(direction)
p result
rescue GameClient::ApiError => e
puts "Exception when calling GameApi->post_moves: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
direction | String | The direction to move |
- Content-Type: Not defined
- Accept: application/json