FleetApp::ApiPath
Inherits Reference < Object
An ApiPath is responsible for generating a URL path to initiate an action on
the fleet.
Constants
API_VERSION = "v1"
The API version that the fleet is currently using. As of 2024-02-13, we only have a "v1".
BASE_PATH = "/api/#{API_VERSION}"
The beginning part of the path that is generated.
Constructors
new(game_name : String, server_id : String, host : String, action : String | Nil = nil, params : Hash(String, String) = {} of String => String)
Initializes an ApiPath
Parameters:
game_nameis the underscored name of the game you want to perform an action on. See:FleetApp::Gamefor possible values.server_idis the server id from the valheimserverhosting app or GamesSite app that you want to perform an action on.actionis the name of the action.paramsrepresents the query params that will be encoded as a string at the end of the path.