initial commit

This commit is contained in:
shoopea 2023-05-09 16:53:56 +02:00
parent 189ec46349
commit fd664330e9
290 changed files with 53303 additions and 1 deletions

24
.gitignore vendored Normal file
View File

@ -0,0 +1,24 @@
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so
# Folders
_obj
_test
# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out
*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*
_testmain.go
*.exe
*.test
*.prof

23
.openapi-generator-ignore Normal file
View File

@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

288
.openapi-generator/FILES Normal file
View File

@ -0,0 +1,288 @@
.gitignore
.openapi-generator-ignore
.travis.yml
README.md
api/openapi.yaml
api_agents.go
api_contracts.go
api_default.go
api_factions.go
api_fleet.go
api_systems.go
client.go
configuration.go
docs/AcceptContract200Response.md
docs/AcceptContract200ResponseData.md
docs/Agent.md
docs/AgentsApi.md
docs/Chart.md
docs/ConnectedSystem.md
docs/Contract.md
docs/ContractDeliverGood.md
docs/ContractPayment.md
docs/ContractTerms.md
docs/ContractsApi.md
docs/Cooldown.md
docs/CreateChart201Response.md
docs/CreateChart201ResponseData.md
docs/CreateShipShipScan201Response.md
docs/CreateShipShipScan201ResponseData.md
docs/CreateShipSystemScan201Response.md
docs/CreateShipSystemScan201ResponseData.md
docs/CreateShipWaypointScan201Response.md
docs/CreateShipWaypointScan201ResponseData.md
docs/CreateSurvey201Response.md
docs/CreateSurvey201ResponseData.md
docs/DefaultApi.md
docs/DeliverContract200Response.md
docs/DeliverContract200ResponseData.md
docs/DeliverContractRequest.md
docs/DockShip200Response.md
docs/ExtractResources201Response.md
docs/ExtractResources201ResponseData.md
docs/ExtractResourcesRequest.md
docs/Extraction.md
docs/ExtractionYield.md
docs/Faction.md
docs/FactionTrait.md
docs/FactionsApi.md
docs/FleetApi.md
docs/FulfillContract200Response.md
docs/GetContract200Response.md
docs/GetContracts200Response.md
docs/GetFaction200Response.md
docs/GetFactions200Response.md
docs/GetJumpGate200Response.md
docs/GetMarket200Response.md
docs/GetMyAgent200Response.md
docs/GetMyShip200Response.md
docs/GetMyShipCargo200Response.md
docs/GetMyShips200Response.md
docs/GetShipCooldown200Response.md
docs/GetShipNav200Response.md
docs/GetShipyard200Response.md
docs/GetSystem200Response.md
docs/GetSystemWaypoints200Response.md
docs/GetSystems200Response.md
docs/GetWaypoint200Response.md
docs/Jettison200Response.md
docs/Jettison200ResponseData.md
docs/JettisonRequest.md
docs/JumpGate.md
docs/JumpShip200Response.md
docs/JumpShip200ResponseData.md
docs/JumpShipRequest.md
docs/Market.md
docs/MarketTradeGood.md
docs/MarketTransaction.md
docs/Meta.md
docs/NavigateShip200Response.md
docs/NavigateShip200ResponseData.md
docs/NavigateShipRequest.md
docs/OrbitShip200Response.md
docs/OrbitShip200ResponseData.md
docs/PatchShipNavRequest.md
docs/PurchaseCargo201Response.md
docs/PurchaseCargoRequest.md
docs/PurchaseShip201Response.md
docs/PurchaseShip201ResponseData.md
docs/PurchaseShipRequest.md
docs/RefuelShip200Response.md
docs/RefuelShip200ResponseData.md
docs/Register201Response.md
docs/Register201ResponseData.md
docs/RegisterRequest.md
docs/ScannedShip.md
docs/ScannedShipEngine.md
docs/ScannedShipFrame.md
docs/ScannedShipMountsInner.md
docs/ScannedShipReactor.md
docs/ScannedSystem.md
docs/ScannedWaypoint.md
docs/SellCargo201Response.md
docs/SellCargo201ResponseData.md
docs/SellCargoRequest.md
docs/Ship.md
docs/ShipCargo.md
docs/ShipCargoItem.md
docs/ShipCrew.md
docs/ShipEngine.md
docs/ShipFrame.md
docs/ShipFuel.md
docs/ShipFuelConsumed.md
docs/ShipModule.md
docs/ShipMount.md
docs/ShipNav.md
docs/ShipNavFlightMode.md
docs/ShipNavRoute.md
docs/ShipNavRouteWaypoint.md
docs/ShipNavStatus.md
docs/ShipReactor.md
docs/ShipRefine200Response.md
docs/ShipRefine200ResponseData.md
docs/ShipRefine200ResponseDataProducedInner.md
docs/ShipRefineRequest.md
docs/ShipRegistration.md
docs/ShipRequirements.md
docs/ShipRole.md
docs/ShipType.md
docs/Shipyard.md
docs/ShipyardShip.md
docs/ShipyardShipTypesInner.md
docs/ShipyardTransaction.md
docs/Survey.md
docs/SurveyDeposit.md
docs/System.md
docs/SystemFaction.md
docs/SystemType.md
docs/SystemWaypoint.md
docs/SystemsApi.md
docs/TradeGood.md
docs/TradeSymbol.md
docs/TransferCargo200Response.md
docs/TransferCargoRequest.md
docs/Waypoint.md
docs/WaypointFaction.md
docs/WaypointOrbital.md
docs/WaypointTrait.md
docs/WaypointType.md
git_push.sh
go.mod
go.sum
model_accept_contract_200_response.go
model_accept_contract_200_response_data.go
model_agent.go
model_chart.go
model_connected_system.go
model_contract.go
model_contract_deliver_good.go
model_contract_payment.go
model_contract_terms.go
model_cooldown.go
model_create_chart_201_response.go
model_create_chart_201_response_data.go
model_create_ship_ship_scan_201_response.go
model_create_ship_ship_scan_201_response_data.go
model_create_ship_system_scan_201_response.go
model_create_ship_system_scan_201_response_data.go
model_create_ship_waypoint_scan_201_response.go
model_create_ship_waypoint_scan_201_response_data.go
model_create_survey_201_response.go
model_create_survey_201_response_data.go
model_deliver_contract_200_response.go
model_deliver_contract_200_response_data.go
model_deliver_contract_request.go
model_dock_ship_200_response.go
model_extract_resources_201_response.go
model_extract_resources_201_response_data.go
model_extract_resources_request.go
model_extraction.go
model_extraction_yield.go
model_faction.go
model_faction_trait.go
model_fulfill_contract_200_response.go
model_get_contract_200_response.go
model_get_contracts_200_response.go
model_get_faction_200_response.go
model_get_factions_200_response.go
model_get_jump_gate_200_response.go
model_get_market_200_response.go
model_get_my_agent_200_response.go
model_get_my_ship_200_response.go
model_get_my_ship_cargo_200_response.go
model_get_my_ships_200_response.go
model_get_ship_cooldown_200_response.go
model_get_ship_nav_200_response.go
model_get_shipyard_200_response.go
model_get_system_200_response.go
model_get_system_waypoints_200_response.go
model_get_systems_200_response.go
model_get_waypoint_200_response.go
model_jettison_200_response.go
model_jettison_200_response_data.go
model_jettison_request.go
model_jump_gate.go
model_jump_ship_200_response.go
model_jump_ship_200_response_data.go
model_jump_ship_request.go
model_market.go
model_market_trade_good.go
model_market_transaction.go
model_meta.go
model_navigate_ship_200_response.go
model_navigate_ship_200_response_data.go
model_navigate_ship_request.go
model_orbit_ship_200_response.go
model_orbit_ship_200_response_data.go
model_patch_ship_nav_request.go
model_purchase_cargo_201_response.go
model_purchase_cargo_request.go
model_purchase_ship_201_response.go
model_purchase_ship_201_response_data.go
model_purchase_ship_request.go
model_refuel_ship_200_response.go
model_refuel_ship_200_response_data.go
model_register_201_response.go
model_register_201_response_data.go
model_register_request.go
model_scanned_ship.go
model_scanned_ship_engine.go
model_scanned_ship_frame.go
model_scanned_ship_mounts_inner.go
model_scanned_ship_reactor.go
model_scanned_system.go
model_scanned_waypoint.go
model_sell_cargo_201_response.go
model_sell_cargo_201_response_data.go
model_sell_cargo_request.go
model_ship.go
model_ship_cargo.go
model_ship_cargo_item.go
model_ship_crew.go
model_ship_engine.go
model_ship_frame.go
model_ship_fuel.go
model_ship_fuel_consumed.go
model_ship_module.go
model_ship_mount.go
model_ship_nav.go
model_ship_nav_flight_mode.go
model_ship_nav_route.go
model_ship_nav_route_waypoint.go
model_ship_nav_status.go
model_ship_reactor.go
model_ship_refine_200_response.go
model_ship_refine_200_response_data.go
model_ship_refine_200_response_data_produced_inner.go
model_ship_refine_request.go
model_ship_registration.go
model_ship_requirements.go
model_ship_role.go
model_ship_type.go
model_shipyard.go
model_shipyard_ship.go
model_shipyard_ship_types_inner.go
model_shipyard_transaction.go
model_survey.go
model_survey_deposit.go
model_system.go
model_system_faction.go
model_system_type.go
model_system_waypoint.go
model_trade_good.go
model_trade_symbol.go
model_transfer_cargo_200_response.go
model_transfer_cargo_request.go
model_waypoint.go
model_waypoint_faction.go
model_waypoint_orbital.go
model_waypoint_trait.go
model_waypoint_type.go
response.go
test/api_agents_test.go
test/api_contracts_test.go
test/api_default_test.go
test/api_factions_test.go
test/api_fleet_test.go
test/api_systems_test.go
utils.go

View File

@ -0,0 +1 @@
6.3.0

8
.travis.yml Normal file
View File

@ -0,0 +1,8 @@
language: go
install:
- go get -d -v .
script:
- go build -v ./

306
README.md
View File

@ -1,2 +1,306 @@
# spacetraders
# Go API client for models
SpaceTraders is an open-universe game and learning platform that offers a set of HTTP endpoints to control a fleet of ships and explore a multiplayer universe.
The API is documented using [OpenAPI](https://github.com/SpaceTradersAPI/api-docs). You can send your first request right here in your browser to check the status of the game server.
```json http
{
\"method\": \"GET\",
\"url\": \"https://api.spacetraders.io/v2\",
}
```
Unlike a traditional game, SpaceTraders does not have a first-party client or app to play the game. Instead, you can use the API to build your own client, write a script to automate your ships, or try an app built by the community.
We have a [Discord channel](https://discord.com/invite/jh6zurdWk5) where you can share your projects, ask questions, and get help from other players.
## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.
- API version: 2.0.0
- Package version: 2.0.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
## Installation
Install the following dependencies:
```shell
go get github.com/stretchr/testify/assert
go get golang.org/x/net/context
```
Put the package under your project folder and add the following in import:
```golang
import models "git.siteop.biz/spacetraders/spacetraders"
```
To use a proxy, set the environment variable `HTTP_PROXY`:
```golang
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
```
## Configuration of Server URL
Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification.
### Select Server Configuration
For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`.
```golang
ctx := context.WithValue(context.Background(), models.ContextServerIndex, 1)
```
### Templated Server URL
Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`.
```golang
ctx := context.WithValue(context.Background(), models.ContextServerVariables, map[string]string{
"basePath": "v2",
})
```
Note, enum values are always validated and all unused variables are silently ignored.
### URLs Configuration per Operation
Each operation can use different server URL defined using `OperationServers` map in the `Configuration`.
An operation is uniquely identified by `"{classname}Service.{nickname}"` string.
Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps.
```golang
ctx := context.WithValue(context.Background(), models.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), models.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})
```
## Documentation for API Endpoints
All URIs are relative to *https://api.spacetraders.io/v2*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AgentsApi* | [**GetMyAgent**](docs/AgentsApi.md#getmyagent) | **Get** /my/agent | My Agent Details
*ContractsApi* | [**AcceptContract**](docs/ContractsApi.md#acceptcontract) | **Post** /my/contracts/{contractId}/accept | Accept Contract
*ContractsApi* | [**DeliverContract**](docs/ContractsApi.md#delivercontract) | **Post** /my/contracts/{contractId}/deliver | Deliver Contract
*ContractsApi* | [**FulfillContract**](docs/ContractsApi.md#fulfillcontract) | **Post** /my/contracts/{contractId}/fulfill | Fulfill Contract
*ContractsApi* | [**GetContract**](docs/ContractsApi.md#getcontract) | **Get** /my/contracts/{contractId} | Get Contract
*ContractsApi* | [**GetContracts**](docs/ContractsApi.md#getcontracts) | **Get** /my/contracts | List Contracts
*DefaultApi* | [**Register**](docs/DefaultApi.md#register) | **Post** /register | Register New Agent
*FactionsApi* | [**GetFaction**](docs/FactionsApi.md#getfaction) | **Get** /factions/{factionSymbol} | Get Faction
*FactionsApi* | [**GetFactions**](docs/FactionsApi.md#getfactions) | **Get** /factions | List Factions
*FleetApi* | [**CreateChart**](docs/FleetApi.md#createchart) | **Post** /my/ships/{shipSymbol}/chart | Create Chart
*FleetApi* | [**CreateShipShipScan**](docs/FleetApi.md#createshipshipscan) | **Post** /my/ships/{shipSymbol}/scan/ships | Scan Ships
*FleetApi* | [**CreateShipSystemScan**](docs/FleetApi.md#createshipsystemscan) | **Post** /my/ships/{shipSymbol}/scan/systems | Scan Systems
*FleetApi* | [**CreateShipWaypointScan**](docs/FleetApi.md#createshipwaypointscan) | **Post** /my/ships/{shipSymbol}/scan/waypoints | Scan Waypoints
*FleetApi* | [**CreateSurvey**](docs/FleetApi.md#createsurvey) | **Post** /my/ships/{shipSymbol}/survey | Create Survey
*FleetApi* | [**DockShip**](docs/FleetApi.md#dockship) | **Post** /my/ships/{shipSymbol}/dock | Dock Ship
*FleetApi* | [**ExtractResources**](docs/FleetApi.md#extractresources) | **Post** /my/ships/{shipSymbol}/extract | Extract Resources
*FleetApi* | [**GetMyShip**](docs/FleetApi.md#getmyship) | **Get** /my/ships/{shipSymbol} | Get Ship
*FleetApi* | [**GetMyShipCargo**](docs/FleetApi.md#getmyshipcargo) | **Get** /my/ships/{shipSymbol}/cargo | Get Ship Cargo
*FleetApi* | [**GetMyShips**](docs/FleetApi.md#getmyships) | **Get** /my/ships | List Ships
*FleetApi* | [**GetShipCooldown**](docs/FleetApi.md#getshipcooldown) | **Get** /my/ships/{shipSymbol}/cooldown | Get Ship Cooldown
*FleetApi* | [**GetShipNav**](docs/FleetApi.md#getshipnav) | **Get** /my/ships/{shipSymbol}/nav | Get Ship Nav
*FleetApi* | [**Jettison**](docs/FleetApi.md#jettison) | **Post** /my/ships/{shipSymbol}/jettison | Jettison Cargo
*FleetApi* | [**JumpShip**](docs/FleetApi.md#jumpship) | **Post** /my/ships/{shipSymbol}/jump | Jump Ship
*FleetApi* | [**NavigateShip**](docs/FleetApi.md#navigateship) | **Post** /my/ships/{shipSymbol}/navigate | Navigate Ship
*FleetApi* | [**OrbitShip**](docs/FleetApi.md#orbitship) | **Post** /my/ships/{shipSymbol}/orbit | Orbit Ship
*FleetApi* | [**PatchShipNav**](docs/FleetApi.md#patchshipnav) | **Patch** /my/ships/{shipSymbol}/nav | Patch Ship Nav
*FleetApi* | [**PurchaseCargo**](docs/FleetApi.md#purchasecargo) | **Post** /my/ships/{shipSymbol}/purchase | Purchase Cargo
*FleetApi* | [**PurchaseShip**](docs/FleetApi.md#purchaseship) | **Post** /my/ships | Purchase Ship
*FleetApi* | [**RefuelShip**](docs/FleetApi.md#refuelship) | **Post** /my/ships/{shipSymbol}/refuel | Refuel Ship
*FleetApi* | [**SellCargo**](docs/FleetApi.md#sellcargo) | **Post** /my/ships/{shipSymbol}/sell | Sell Cargo
*FleetApi* | [**ShipRefine**](docs/FleetApi.md#shiprefine) | **Post** /my/ships/{shipSymbol}/refine | Ship Refine
*FleetApi* | [**TransferCargo**](docs/FleetApi.md#transfercargo) | **Post** /my/ships/{shipSymbol}/transfer | Transfer Cargo
*FleetApi* | [**WarpShip**](docs/FleetApi.md#warpship) | **Post** /my/ships/{shipSymbol}/warp | Warp Ship
*SystemsApi* | [**GetJumpGate**](docs/SystemsApi.md#getjumpgate) | **Get** /systems/{systemSymbol}/waypoints/{waypointSymbol}/jump-gate | Get Jump Gate
*SystemsApi* | [**GetMarket**](docs/SystemsApi.md#getmarket) | **Get** /systems/{systemSymbol}/waypoints/{waypointSymbol}/market | Get Market
*SystemsApi* | [**GetShipyard**](docs/SystemsApi.md#getshipyard) | **Get** /systems/{systemSymbol}/waypoints/{waypointSymbol}/shipyard | Get Shipyard
*SystemsApi* | [**GetSystem**](docs/SystemsApi.md#getsystem) | **Get** /systems/{systemSymbol} | Get System
*SystemsApi* | [**GetSystemWaypoints**](docs/SystemsApi.md#getsystemwaypoints) | **Get** /systems/{systemSymbol}/waypoints | List Waypoints
*SystemsApi* | [**GetSystems**](docs/SystemsApi.md#getsystems) | **Get** /systems | List Systems
*SystemsApi* | [**GetWaypoint**](docs/SystemsApi.md#getwaypoint) | **Get** /systems/{systemSymbol}/waypoints/{waypointSymbol} | Get Waypoint
## Documentation For Models
- [AcceptContract200Response](docs/AcceptContract200Response.md)
- [AcceptContract200ResponseData](docs/AcceptContract200ResponseData.md)
- [Agent](docs/Agent.md)
- [Chart](docs/Chart.md)
- [ConnectedSystem](docs/ConnectedSystem.md)
- [Contract](docs/Contract.md)
- [ContractDeliverGood](docs/ContractDeliverGood.md)
- [ContractPayment](docs/ContractPayment.md)
- [ContractTerms](docs/ContractTerms.md)
- [Cooldown](docs/Cooldown.md)
- [CreateChart201Response](docs/CreateChart201Response.md)
- [CreateChart201ResponseData](docs/CreateChart201ResponseData.md)
- [CreateShipShipScan201Response](docs/CreateShipShipScan201Response.md)
- [CreateShipShipScan201ResponseData](docs/CreateShipShipScan201ResponseData.md)
- [CreateShipSystemScan201Response](docs/CreateShipSystemScan201Response.md)
- [CreateShipSystemScan201ResponseData](docs/CreateShipSystemScan201ResponseData.md)
- [CreateShipWaypointScan201Response](docs/CreateShipWaypointScan201Response.md)
- [CreateShipWaypointScan201ResponseData](docs/CreateShipWaypointScan201ResponseData.md)
- [CreateSurvey201Response](docs/CreateSurvey201Response.md)
- [CreateSurvey201ResponseData](docs/CreateSurvey201ResponseData.md)
- [DeliverContract200Response](docs/DeliverContract200Response.md)
- [DeliverContract200ResponseData](docs/DeliverContract200ResponseData.md)
- [DeliverContractRequest](docs/DeliverContractRequest.md)
- [DockShip200Response](docs/DockShip200Response.md)
- [ExtractResources201Response](docs/ExtractResources201Response.md)
- [ExtractResources201ResponseData](docs/ExtractResources201ResponseData.md)
- [ExtractResourcesRequest](docs/ExtractResourcesRequest.md)
- [Extraction](docs/Extraction.md)
- [ExtractionYield](docs/ExtractionYield.md)
- [Faction](docs/Faction.md)
- [FactionTrait](docs/FactionTrait.md)
- [FulfillContract200Response](docs/FulfillContract200Response.md)
- [GetContract200Response](docs/GetContract200Response.md)
- [GetContracts200Response](docs/GetContracts200Response.md)
- [GetFaction200Response](docs/GetFaction200Response.md)
- [GetFactions200Response](docs/GetFactions200Response.md)
- [GetJumpGate200Response](docs/GetJumpGate200Response.md)
- [GetMarket200Response](docs/GetMarket200Response.md)
- [GetMyAgent200Response](docs/GetMyAgent200Response.md)
- [GetMyShip200Response](docs/GetMyShip200Response.md)
- [GetMyShipCargo200Response](docs/GetMyShipCargo200Response.md)
- [GetMyShips200Response](docs/GetMyShips200Response.md)
- [GetShipCooldown200Response](docs/GetShipCooldown200Response.md)
- [GetShipNav200Response](docs/GetShipNav200Response.md)
- [GetShipyard200Response](docs/GetShipyard200Response.md)
- [GetSystem200Response](docs/GetSystem200Response.md)
- [GetSystemWaypoints200Response](docs/GetSystemWaypoints200Response.md)
- [GetSystems200Response](docs/GetSystems200Response.md)
- [GetWaypoint200Response](docs/GetWaypoint200Response.md)
- [Jettison200Response](docs/Jettison200Response.md)
- [Jettison200ResponseData](docs/Jettison200ResponseData.md)
- [JettisonRequest](docs/JettisonRequest.md)
- [JumpGate](docs/JumpGate.md)
- [JumpShip200Response](docs/JumpShip200Response.md)
- [JumpShip200ResponseData](docs/JumpShip200ResponseData.md)
- [JumpShipRequest](docs/JumpShipRequest.md)
- [Market](docs/Market.md)
- [MarketTradeGood](docs/MarketTradeGood.md)
- [MarketTransaction](docs/MarketTransaction.md)
- [Meta](docs/Meta.md)
- [NavigateShip200Response](docs/NavigateShip200Response.md)
- [NavigateShip200ResponseData](docs/NavigateShip200ResponseData.md)
- [NavigateShipRequest](docs/NavigateShipRequest.md)
- [OrbitShip200Response](docs/OrbitShip200Response.md)
- [OrbitShip200ResponseData](docs/OrbitShip200ResponseData.md)
- [PatchShipNavRequest](docs/PatchShipNavRequest.md)
- [PurchaseCargo201Response](docs/PurchaseCargo201Response.md)
- [PurchaseCargoRequest](docs/PurchaseCargoRequest.md)
- [PurchaseShip201Response](docs/PurchaseShip201Response.md)
- [PurchaseShip201ResponseData](docs/PurchaseShip201ResponseData.md)
- [PurchaseShipRequest](docs/PurchaseShipRequest.md)
- [RefuelShip200Response](docs/RefuelShip200Response.md)
- [RefuelShip200ResponseData](docs/RefuelShip200ResponseData.md)
- [Register201Response](docs/Register201Response.md)
- [Register201ResponseData](docs/Register201ResponseData.md)
- [RegisterRequest](docs/RegisterRequest.md)
- [ScannedShip](docs/ScannedShip.md)
- [ScannedShipEngine](docs/ScannedShipEngine.md)
- [ScannedShipFrame](docs/ScannedShipFrame.md)
- [ScannedShipMountsInner](docs/ScannedShipMountsInner.md)
- [ScannedShipReactor](docs/ScannedShipReactor.md)
- [ScannedSystem](docs/ScannedSystem.md)
- [ScannedWaypoint](docs/ScannedWaypoint.md)
- [SellCargo201Response](docs/SellCargo201Response.md)
- [SellCargo201ResponseData](docs/SellCargo201ResponseData.md)
- [SellCargoRequest](docs/SellCargoRequest.md)
- [Ship](docs/Ship.md)
- [ShipCargo](docs/ShipCargo.md)
- [ShipCargoItem](docs/ShipCargoItem.md)
- [ShipCrew](docs/ShipCrew.md)
- [ShipEngine](docs/ShipEngine.md)
- [ShipFrame](docs/ShipFrame.md)
- [ShipFuel](docs/ShipFuel.md)
- [ShipFuelConsumed](docs/ShipFuelConsumed.md)
- [ShipModule](docs/ShipModule.md)
- [ShipMount](docs/ShipMount.md)
- [ShipNav](docs/ShipNav.md)
- [ShipNavFlightMode](docs/ShipNavFlightMode.md)
- [ShipNavRoute](docs/ShipNavRoute.md)
- [ShipNavRouteWaypoint](docs/ShipNavRouteWaypoint.md)
- [ShipNavStatus](docs/ShipNavStatus.md)
- [ShipReactor](docs/ShipReactor.md)
- [ShipRefine200Response](docs/ShipRefine200Response.md)
- [ShipRefine200ResponseData](docs/ShipRefine200ResponseData.md)
- [ShipRefine200ResponseDataProducedInner](docs/ShipRefine200ResponseDataProducedInner.md)
- [ShipRefineRequest](docs/ShipRefineRequest.md)
- [ShipRegistration](docs/ShipRegistration.md)
- [ShipRequirements](docs/ShipRequirements.md)
- [ShipRole](docs/ShipRole.md)
- [ShipType](docs/ShipType.md)
- [Shipyard](docs/Shipyard.md)
- [ShipyardShip](docs/ShipyardShip.md)
- [ShipyardShipTypesInner](docs/ShipyardShipTypesInner.md)
- [ShipyardTransaction](docs/ShipyardTransaction.md)
- [Survey](docs/Survey.md)
- [SurveyDeposit](docs/SurveyDeposit.md)
- [System](docs/System.md)
- [SystemFaction](docs/SystemFaction.md)
- [SystemType](docs/SystemType.md)
- [SystemWaypoint](docs/SystemWaypoint.md)
- [TradeGood](docs/TradeGood.md)
- [TradeSymbol](docs/TradeSymbol.md)
- [TransferCargo200Response](docs/TransferCargo200Response.md)
- [TransferCargoRequest](docs/TransferCargoRequest.md)
- [Waypoint](docs/Waypoint.md)
- [WaypointFaction](docs/WaypointFaction.md)
- [WaypointOrbital](docs/WaypointOrbital.md)
- [WaypointTrait](docs/WaypointTrait.md)
- [WaypointType](docs/WaypointType.md)
## Documentation For Authorization
### AgentToken
- **Type**: HTTP Bearer token authentication
Example
```golang
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)
```
## Documentation for Utility Methods
Due to the fact that model structure members are all pointers, this package contains
a number of utility functions to easily obtain pointers to values of basic types.
Each of these functions takes a value of the given basic type and returns a pointer to it:
* `PtrBool`
* `PtrInt`
* `PtrInt32`
* `PtrInt64`
* `PtrFloat`
* `PtrFloat32`
* `PtrFloat64`
* `PtrString`
* `PtrTime`
## Author
joel@spacetraders.io

6821
api/openapi.yaml Normal file

File diff suppressed because it is too large Load Diff

123
api_agents.go Normal file
View File

@ -0,0 +1,123 @@
/*
SpaceTraders API
SpaceTraders is an open-universe game and learning platform that offers a set of HTTP endpoints to control a fleet of ships and explore a multiplayer universe. The API is documented using [OpenAPI](https://github.com/SpaceTradersAPI/api-docs). You can send your first request right here in your browser to check the status of the game server. ```json http { \"method\": \"GET\", \"url\": \"https://api.spacetraders.io/v2\", } ``` Unlike a traditional game, SpaceTraders does not have a first-party client or app to play the game. Instead, you can use the API to build your own client, write a script to automate your ships, or try an app built by the community. We have a [Discord channel](https://discord.com/invite/jh6zurdWk5) where you can share your projects, ask questions, and get help from other players.
API version: 2.0.0
Contact: joel@spacetraders.io
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package models
import (
"bytes"
"context"
"io/ioutil"
"net/http"
"net/url"
)
// AgentsApiService AgentsApi service
type AgentsApiService service
type ApiGetMyAgentRequest struct {
ctx context.Context
ApiService *AgentsApiService
}
func (r ApiGetMyAgentRequest) Execute() (*GetMyAgent200Response, *http.Response, error) {
return r.ApiService.GetMyAgentExecute(r)
}
/*
GetMyAgent My Agent Details
Fetch your agent's details.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiGetMyAgentRequest
*/
func (a *AgentsApiService) GetMyAgent(ctx context.Context) ApiGetMyAgentRequest {
return ApiGetMyAgentRequest{
ApiService: a,
ctx: ctx,
}
}
// Execute executes the request
// @return GetMyAgent200Response
func (a *AgentsApiService) GetMyAgentExecute(r ApiGetMyAgentRequest) (*GetMyAgent200Response, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *GetMyAgent200Response
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AgentsApiService.GetMyAgent")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/my/agent"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
// set Content-Type header
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
if localVarHTTPContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
}
// to determine the Accept header
localVarHTTPHeaderAccepts := []string{"application/json"}
// set Accept header
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
if err != nil {
return localVarReturnValue, nil, err
}
localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, nil
}

564
api_contracts.go Normal file
View File

@ -0,0 +1,564 @@
/*
SpaceTraders API
SpaceTraders is an open-universe game and learning platform that offers a set of HTTP endpoints to control a fleet of ships and explore a multiplayer universe. The API is documented using [OpenAPI](https://github.com/SpaceTradersAPI/api-docs). You can send your first request right here in your browser to check the status of the game server. ```json http { \"method\": \"GET\", \"url\": \"https://api.spacetraders.io/v2\", } ``` Unlike a traditional game, SpaceTraders does not have a first-party client or app to play the game. Instead, you can use the API to build your own client, write a script to automate your ships, or try an app built by the community. We have a [Discord channel](https://discord.com/invite/jh6zurdWk5) where you can share your projects, ask questions, and get help from other players.
API version: 2.0.0
Contact: joel@spacetraders.io
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package models
import (
"bytes"
"context"
"io/ioutil"
"net/http"
"net/url"
"strings"
)
// ContractsApiService ContractsApi service
type ContractsApiService service
type ApiAcceptContractRequest struct {
ctx context.Context
ApiService *ContractsApiService
contractId string
}
func (r ApiAcceptContractRequest) Execute() (*AcceptContract200Response, *http.Response, error) {
return r.ApiService.AcceptContractExecute(r)
}
/*
AcceptContract Accept Contract
Accept a contract.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param contractId
@return ApiAcceptContractRequest
*/
func (a *ContractsApiService) AcceptContract(ctx context.Context, contractId string) ApiAcceptContractRequest {
return ApiAcceptContractRequest{
ApiService: a,
ctx: ctx,
contractId: contractId,
}
}
// Execute executes the request
// @return AcceptContract200Response
func (a *ContractsApiService) AcceptContractExecute(r ApiAcceptContractRequest) (*AcceptContract200Response, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *AcceptContract200Response
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContractsApiService.AcceptContract")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/my/contracts/{contractId}/accept"
localVarPath = strings.Replace(localVarPath, "{"+"contractId"+"}", url.PathEscape(parameterValueToString(r.contractId, "contractId")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
// set Content-Type header
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
if localVarHTTPContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
}
// to determine the Accept header
localVarHTTPHeaderAccepts := []string{"application/json"}
// set Accept header
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
if err != nil {
return localVarReturnValue, nil, err
}
localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, nil
}
type ApiDeliverContractRequest struct {
ctx context.Context
ApiService *ContractsApiService
contractId string
deliverContractRequest *DeliverContractRequest
}
func (r ApiDeliverContractRequest) DeliverContractRequest(deliverContractRequest DeliverContractRequest) ApiDeliverContractRequest {
r.deliverContractRequest = &deliverContractRequest
return r
}
func (r ApiDeliverContractRequest) Execute() (*DeliverContract200Response, *http.Response, error) {
return r.ApiService.DeliverContractExecute(r)
}
/*
DeliverContract Deliver Contract
Deliver cargo on a given contract.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param contractId The ID of the contract
@return ApiDeliverContractRequest
*/
func (a *ContractsApiService) DeliverContract(ctx context.Context, contractId string) ApiDeliverContractRequest {
return ApiDeliverContractRequest{
ApiService: a,
ctx: ctx,
contractId: contractId,
}
}
// Execute executes the request
// @return DeliverContract200Response
func (a *ContractsApiService) DeliverContractExecute(r ApiDeliverContractRequest) (*DeliverContract200Response, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *DeliverContract200Response
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContractsApiService.DeliverContract")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/my/contracts/{contractId}/deliver"
localVarPath = strings.Replace(localVarPath, "{"+"contractId"+"}", url.PathEscape(parameterValueToString(r.contractId, "contractId")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{"application/json"}
// set Content-Type header
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
if localVarHTTPContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
}
// to determine the Accept header
localVarHTTPHeaderAccepts := []string{"application/json"}
// set Accept header
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
// body params
localVarPostBody = r.deliverContractRequest
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
if err != nil {
return localVarReturnValue, nil, err
}
localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, nil
}
type ApiFulfillContractRequest struct {
ctx context.Context
ApiService *ContractsApiService
contractId string
}
func (r ApiFulfillContractRequest) Execute() (*FulfillContract200Response, *http.Response, error) {
return r.ApiService.FulfillContractExecute(r)
}
/*
FulfillContract Fulfill Contract
Fulfill a contract
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param contractId The ID of the contract
@return ApiFulfillContractRequest
*/
func (a *ContractsApiService) FulfillContract(ctx context.Context, contractId string) ApiFulfillContractRequest {
return ApiFulfillContractRequest{
ApiService: a,
ctx: ctx,
contractId: contractId,
}
}
// Execute executes the request
// @return FulfillContract200Response
func (a *ContractsApiService) FulfillContractExecute(r ApiFulfillContractRequest) (*FulfillContract200Response, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *FulfillContract200Response
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContractsApiService.FulfillContract")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/my/contracts/{contractId}/fulfill"
localVarPath = strings.Replace(localVarPath, "{"+"contractId"+"}", url.PathEscape(parameterValueToString(r.contractId, "contractId")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
// set Content-Type header
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
if localVarHTTPContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
}
// to determine the Accept header
localVarHTTPHeaderAccepts := []string{"application/json"}
// set Accept header
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
if err != nil {
return localVarReturnValue, nil, err
}
localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, nil
}
type ApiGetContractRequest struct {
ctx context.Context
ApiService *ContractsApiService
contractId string
}
func (r ApiGetContractRequest) Execute() (*GetContract200Response, *http.Response, error) {
return r.ApiService.GetContractExecute(r)
}
/*
GetContract Get Contract
Get the details of a contract by ID.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param contractId The contract ID
@return ApiGetContractRequest
*/
func (a *ContractsApiService) GetContract(ctx context.Context, contractId string) ApiGetContractRequest {
return ApiGetContractRequest{
ApiService: a,
ctx: ctx,
contractId: contractId,
}
}
// Execute executes the request
// @return GetContract200Response
func (a *ContractsApiService) GetContractExecute(r ApiGetContractRequest) (*GetContract200Response, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *GetContract200Response
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContractsApiService.GetContract")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/my/contracts/{contractId}"
localVarPath = strings.Replace(localVarPath, "{"+"contractId"+"}", url.PathEscape(parameterValueToString(r.contractId, "contractId")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
// set Content-Type header
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
if localVarHTTPContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
}
// to determine the Accept header
localVarHTTPHeaderAccepts := []string{"application/json"}
// set Accept header
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
if err != nil {
return localVarReturnValue, nil, err
}
localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, nil
}
type ApiGetContractsRequest struct {
ctx context.Context
ApiService *ContractsApiService
page *int32
limit *int32
}
// What entry offset to request
func (r ApiGetContractsRequest) Page(page int32) ApiGetContractsRequest {
r.page = &page
return r
}
// How many entries to return per page
func (r ApiGetContractsRequest) Limit(limit int32) ApiGetContractsRequest {
r.limit = &limit
return r
}
func (r ApiGetContractsRequest) Execute() (*GetContracts200Response, *http.Response, error) {
return r.ApiService.GetContractsExecute(r)
}
/*
GetContracts List Contracts
List all of your contracts.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiGetContractsRequest
*/
func (a *ContractsApiService) GetContracts(ctx context.Context) ApiGetContractsRequest {
return ApiGetContractsRequest{
ApiService: a,
ctx: ctx,
}
}
// Execute executes the request
// @return GetContracts200Response
func (a *ContractsApiService) GetContractsExecute(r ApiGetContractsRequest) (*GetContracts200Response, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *GetContracts200Response
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ContractsApiService.GetContracts")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/my/contracts"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.page != nil {
parameterAddToQuery(localVarQueryParams, "page", r.page, "")
}
if r.limit != nil {
parameterAddToQuery(localVarQueryParams, "limit", r.limit, "")
}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
// set Content-Type header
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
if localVarHTTPContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
}
// to determine the Accept header
localVarHTTPHeaderAccepts := []string{"application/json"}
// set Accept header
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
if err != nil {
return localVarReturnValue, nil, err
}
localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, nil
}

146
api_default.go Normal file
View File

@ -0,0 +1,146 @@
/*
SpaceTraders API
SpaceTraders is an open-universe game and learning platform that offers a set of HTTP endpoints to control a fleet of ships and explore a multiplayer universe. The API is documented using [OpenAPI](https://github.com/SpaceTradersAPI/api-docs). You can send your first request right here in your browser to check the status of the game server. ```json http { \"method\": \"GET\", \"url\": \"https://api.spacetraders.io/v2\", } ``` Unlike a traditional game, SpaceTraders does not have a first-party client or app to play the game. Instead, you can use the API to build your own client, write a script to automate your ships, or try an app built by the community. We have a [Discord channel](https://discord.com/invite/jh6zurdWk5) where you can share your projects, ask questions, and get help from other players.
API version: 2.0.0
Contact: joel@spacetraders.io
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package models
import (
"bytes"
"context"
"io/ioutil"
"net/http"
"net/url"
)
// DefaultApiService DefaultApi service
type DefaultApiService service
type ApiRegisterRequest struct {
ctx context.Context
ApiService *DefaultApiService
registerRequest *RegisterRequest
}
//
func (r ApiRegisterRequest) RegisterRequest(registerRequest RegisterRequest) ApiRegisterRequest {
r.registerRequest = &registerRequest
return r
}
func (r ApiRegisterRequest) Execute() (*Register201Response, *http.Response, error) {
return r.ApiService.RegisterExecute(r)
}
/*
Register Register New Agent
Creates a new agent and ties it to a temporary Account.
The agent symbol is a 3-14 character string that will represent your agent. This symbol will prefix the symbol of every ship you own. Agent symbols will be cast to all uppercase characters.
A new agent will be granted an authorization token, a contract with their starting faction, a command ship with a jump drive, and one hundred thousand credits.
> #### Keep your token safe and secure
>
> Save your token during the alpha phase. There is no way to regenerate this token without starting a new agent. In the future you will be able to generate and manage your tokens from the SpaceTraders website.
You can accept your contract using the `/my/contracts/{contractId}/accept` endpoint. You will want to navigate your command ship to a nearby asteroid field and execute the `/my/ships/{shipSymbol}/extract` endpoint to mine various types of ores and minerals.
Return to the contract destination and execute the `/my/ships/{shipSymbol}/deliver` endpoint to deposit goods into the contract.
When your contract is fulfilled, you can call `/my/contracts/{contractId}/fulfill` to retrieve payment.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiRegisterRequest
*/
func (a *DefaultApiService) Register(ctx context.Context) ApiRegisterRequest {
return ApiRegisterRequest{
ApiService: a,
ctx: ctx,
}
}
// Execute executes the request
// @return Register201Response
func (a *DefaultApiService) RegisterExecute(r ApiRegisterRequest) (*Register201Response, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodPost
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *Register201Response
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultApiService.Register")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/register"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{"application/json"}
// set Content-Type header
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
if localVarHTTPContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
}
// to determine the Accept header
localVarHTTPHeaderAccepts := []string{"application/json"}
// set Accept header
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
// body params
localVarPostBody = r.registerRequest
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
if err != nil {
return localVarReturnValue, nil, err
}
localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, nil
}

247
api_factions.go Normal file
View File

@ -0,0 +1,247 @@
/*
SpaceTraders API
SpaceTraders is an open-universe game and learning platform that offers a set of HTTP endpoints to control a fleet of ships and explore a multiplayer universe. The API is documented using [OpenAPI](https://github.com/SpaceTradersAPI/api-docs). You can send your first request right here in your browser to check the status of the game server. ```json http { \"method\": \"GET\", \"url\": \"https://api.spacetraders.io/v2\", } ``` Unlike a traditional game, SpaceTraders does not have a first-party client or app to play the game. Instead, you can use the API to build your own client, write a script to automate your ships, or try an app built by the community. We have a [Discord channel](https://discord.com/invite/jh6zurdWk5) where you can share your projects, ask questions, and get help from other players.
API version: 2.0.0
Contact: joel@spacetraders.io
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package models
import (
"bytes"
"context"
"io/ioutil"
"net/http"
"net/url"
"strings"
)
// FactionsApiService FactionsApi service
type FactionsApiService service
type ApiGetFactionRequest struct {
ctx context.Context
ApiService *FactionsApiService
factionSymbol string
}
func (r ApiGetFactionRequest) Execute() (*GetFaction200Response, *http.Response, error) {
return r.ApiService.GetFactionExecute(r)
}
/*
GetFaction Get Faction
View the details of a faction.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param factionSymbol The faction symbol
@return ApiGetFactionRequest
*/
func (a *FactionsApiService) GetFaction(ctx context.Context, factionSymbol string) ApiGetFactionRequest {
return ApiGetFactionRequest{
ApiService: a,
ctx: ctx,
factionSymbol: factionSymbol,
}
}
// Execute executes the request
// @return GetFaction200Response
func (a *FactionsApiService) GetFactionExecute(r ApiGetFactionRequest) (*GetFaction200Response, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *GetFaction200Response
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FactionsApiService.GetFaction")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/factions/{factionSymbol}"
localVarPath = strings.Replace(localVarPath, "{"+"factionSymbol"+"}", url.PathEscape(parameterValueToString(r.factionSymbol, "factionSymbol")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
// set Content-Type header
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
if localVarHTTPContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
}
// to determine the Accept header
localVarHTTPHeaderAccepts := []string{"application/json"}
// set Accept header
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
if err != nil {
return localVarReturnValue, nil, err
}
localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, nil
}
type ApiGetFactionsRequest struct {
ctx context.Context
ApiService *FactionsApiService
page *int32
limit *int32
}
// What entry offset to request
func (r ApiGetFactionsRequest) Page(page int32) ApiGetFactionsRequest {
r.page = &page
return r
}
// How many entries to return per page
func (r ApiGetFactionsRequest) Limit(limit int32) ApiGetFactionsRequest {
r.limit = &limit
return r
}
func (r ApiGetFactionsRequest) Execute() (*GetFactions200Response, *http.Response, error) {
return r.ApiService.GetFactionsExecute(r)
}
/*
GetFactions List Factions
List all discovered factions in the game.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiGetFactionsRequest
*/
func (a *FactionsApiService) GetFactions(ctx context.Context) ApiGetFactionsRequest {
return ApiGetFactionsRequest{
ApiService: a,
ctx: ctx,
}
}
// Execute executes the request
// @return GetFactions200Response
func (a *FactionsApiService) GetFactionsExecute(r ApiGetFactionsRequest) (*GetFactions200Response, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *GetFactions200Response
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FactionsApiService.GetFactions")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/factions"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.page != nil {
parameterAddToQuery(localVarQueryParams, "page", r.page, "")
}
if r.limit != nil {
parameterAddToQuery(localVarQueryParams, "limit", r.limit, "")
}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
// set Content-Type header
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
if localVarHTTPContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
}
// to determine the Accept header
localVarHTTPHeaderAccepts := []string{"application/json"}
// set Accept header
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
if err != nil {
return localVarReturnValue, nil, err
}
localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, nil
}

2619
api_fleet.go Normal file

File diff suppressed because it is too large Load Diff

798
api_systems.go Normal file
View File

@ -0,0 +1,798 @@
/*
SpaceTraders API
SpaceTraders is an open-universe game and learning platform that offers a set of HTTP endpoints to control a fleet of ships and explore a multiplayer universe. The API is documented using [OpenAPI](https://github.com/SpaceTradersAPI/api-docs). You can send your first request right here in your browser to check the status of the game server. ```json http { \"method\": \"GET\", \"url\": \"https://api.spacetraders.io/v2\", } ``` Unlike a traditional game, SpaceTraders does not have a first-party client or app to play the game. Instead, you can use the API to build your own client, write a script to automate your ships, or try an app built by the community. We have a [Discord channel](https://discord.com/invite/jh6zurdWk5) where you can share your projects, ask questions, and get help from other players.
API version: 2.0.0
Contact: joel@spacetraders.io
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package models
import (
"bytes"
"context"
"io/ioutil"
"net/http"
"net/url"
"strings"
)
// SystemsApiService SystemsApi service
type SystemsApiService service
type ApiGetJumpGateRequest struct {
ctx context.Context
ApiService *SystemsApiService
systemSymbol string
waypointSymbol string
}
func (r ApiGetJumpGateRequest) Execute() (*GetJumpGate200Response, *http.Response, error) {
return r.ApiService.GetJumpGateExecute(r)
}
/*
GetJumpGate Get Jump Gate
Get jump gate details for a waypoint.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param systemSymbol The system symbol
@param waypointSymbol The waypoint symbol
@return ApiGetJumpGateRequest
*/
func (a *SystemsApiService) GetJumpGate(ctx context.Context, systemSymbol string, waypointSymbol string) ApiGetJumpGateRequest {
return ApiGetJumpGateRequest{
ApiService: a,
ctx: ctx,
systemSymbol: systemSymbol,
waypointSymbol: waypointSymbol,
}
}
// Execute executes the request
// @return GetJumpGate200Response
func (a *SystemsApiService) GetJumpGateExecute(r ApiGetJumpGateRequest) (*GetJumpGate200Response, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *GetJumpGate200Response
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SystemsApiService.GetJumpGate")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/systems/{systemSymbol}/waypoints/{waypointSymbol}/jump-gate"
localVarPath = strings.Replace(localVarPath, "{"+"systemSymbol"+"}", url.PathEscape(parameterValueToString(r.systemSymbol, "systemSymbol")), -1)
localVarPath = strings.Replace(localVarPath, "{"+"waypointSymbol"+"}", url.PathEscape(parameterValueToString(r.waypointSymbol, "waypointSymbol")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
// set Content-Type header
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
if localVarHTTPContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
}
// to determine the Accept header
localVarHTTPHeaderAccepts := []string{"application/json"}
// set Accept header
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
if err != nil {
return localVarReturnValue, nil, err
}
localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, nil
}
type ApiGetMarketRequest struct {
ctx context.Context
ApiService *SystemsApiService
systemSymbol string
waypointSymbol string
}
func (r ApiGetMarketRequest) Execute() (*GetMarket200Response, *http.Response, error) {
return r.ApiService.GetMarketExecute(r)
}
/*
GetMarket Get Market
Retrieve imports, exports and exchange data from a marketplace. Imports can be sold, exports can be purchased, and exchange goods can be purchased or sold. Send a ship to the waypoint to access trade good prices and recent transactions.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param systemSymbol The system symbol
@param waypointSymbol The waypoint symbol
@return ApiGetMarketRequest
*/
func (a *SystemsApiService) GetMarket(ctx context.Context, systemSymbol string, waypointSymbol string) ApiGetMarketRequest {
return ApiGetMarketRequest{
ApiService: a,
ctx: ctx,
systemSymbol: systemSymbol,
waypointSymbol: waypointSymbol,
}
}
// Execute executes the request
// @return GetMarket200Response
func (a *SystemsApiService) GetMarketExecute(r ApiGetMarketRequest) (*GetMarket200Response, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *GetMarket200Response
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SystemsApiService.GetMarket")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/systems/{systemSymbol}/waypoints/{waypointSymbol}/market"
localVarPath = strings.Replace(localVarPath, "{"+"systemSymbol"+"}", url.PathEscape(parameterValueToString(r.systemSymbol, "systemSymbol")), -1)
localVarPath = strings.Replace(localVarPath, "{"+"waypointSymbol"+"}", url.PathEscape(parameterValueToString(r.waypointSymbol, "waypointSymbol")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
// set Content-Type header
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
if localVarHTTPContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
}
// to determine the Accept header
localVarHTTPHeaderAccepts := []string{"application/json"}
// set Accept header
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
if err != nil {
return localVarReturnValue, nil, err
}
localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, nil
}
type ApiGetShipyardRequest struct {
ctx context.Context
ApiService *SystemsApiService
systemSymbol string
waypointSymbol string
}
func (r ApiGetShipyardRequest) Execute() (*GetShipyard200Response, *http.Response, error) {
return r.ApiService.GetShipyardExecute(r)
}
/*
GetShipyard Get Shipyard
Get the shipyard for a waypoint.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param systemSymbol The system symbol
@param waypointSymbol The waypoint symbol
@return ApiGetShipyardRequest
*/
func (a *SystemsApiService) GetShipyard(ctx context.Context, systemSymbol string, waypointSymbol string) ApiGetShipyardRequest {
return ApiGetShipyardRequest{
ApiService: a,
ctx: ctx,
systemSymbol: systemSymbol,
waypointSymbol: waypointSymbol,
}
}
// Execute executes the request
// @return GetShipyard200Response
func (a *SystemsApiService) GetShipyardExecute(r ApiGetShipyardRequest) (*GetShipyard200Response, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *GetShipyard200Response
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SystemsApiService.GetShipyard")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/systems/{systemSymbol}/waypoints/{waypointSymbol}/shipyard"
localVarPath = strings.Replace(localVarPath, "{"+"systemSymbol"+"}", url.PathEscape(parameterValueToString(r.systemSymbol, "systemSymbol")), -1)
localVarPath = strings.Replace(localVarPath, "{"+"waypointSymbol"+"}", url.PathEscape(parameterValueToString(r.waypointSymbol, "waypointSymbol")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
// set Content-Type header
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
if localVarHTTPContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
}
// to determine the Accept header
localVarHTTPHeaderAccepts := []string{"application/json"}
// set Accept header
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
if err != nil {
return localVarReturnValue, nil, err
}
localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, nil
}
type ApiGetSystemRequest struct {
ctx context.Context
ApiService *SystemsApiService
systemSymbol string
}
func (r ApiGetSystemRequest) Execute() (*GetSystem200Response, *http.Response, error) {
return r.ApiService.GetSystemExecute(r)
}
/*
GetSystem Get System
Get the details of a system.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param systemSymbol The system symbol
@return ApiGetSystemRequest
*/
func (a *SystemsApiService) GetSystem(ctx context.Context, systemSymbol string) ApiGetSystemRequest {
return ApiGetSystemRequest{
ApiService: a,
ctx: ctx,
systemSymbol: systemSymbol,
}
}
// Execute executes the request
// @return GetSystem200Response
func (a *SystemsApiService) GetSystemExecute(r ApiGetSystemRequest) (*GetSystem200Response, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *GetSystem200Response
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SystemsApiService.GetSystem")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/systems/{systemSymbol}"
localVarPath = strings.Replace(localVarPath, "{"+"systemSymbol"+"}", url.PathEscape(parameterValueToString(r.systemSymbol, "systemSymbol")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
// set Content-Type header
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
if localVarHTTPContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
}
// to determine the Accept header
localVarHTTPHeaderAccepts := []string{"application/json"}
// set Accept header
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
if err != nil {
return localVarReturnValue, nil, err
}
localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, nil
}
type ApiGetSystemWaypointsRequest struct {
ctx context.Context
ApiService *SystemsApiService
systemSymbol string
page *int32
limit *int32
}
// What entry offset to request
func (r ApiGetSystemWaypointsRequest) Page(page int32) ApiGetSystemWaypointsRequest {
r.page = &page
return r
}
// How many entries to return per page
func (r ApiGetSystemWaypointsRequest) Limit(limit int32) ApiGetSystemWaypointsRequest {
r.limit = &limit
return r
}
func (r ApiGetSystemWaypointsRequest) Execute() (*GetSystemWaypoints200Response, *http.Response, error) {
return r.ApiService.GetSystemWaypointsExecute(r)
}
/*
GetSystemWaypoints List Waypoints
Fetch all of the waypoints for a given system. System must be charted or a ship must be present to return waypoint details.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param systemSymbol The system symbol
@return ApiGetSystemWaypointsRequest
*/
func (a *SystemsApiService) GetSystemWaypoints(ctx context.Context, systemSymbol string) ApiGetSystemWaypointsRequest {
return ApiGetSystemWaypointsRequest{
ApiService: a,
ctx: ctx,
systemSymbol: systemSymbol,
}
}
// Execute executes the request
// @return GetSystemWaypoints200Response
func (a *SystemsApiService) GetSystemWaypointsExecute(r ApiGetSystemWaypointsRequest) (*GetSystemWaypoints200Response, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *GetSystemWaypoints200Response
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SystemsApiService.GetSystemWaypoints")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/systems/{systemSymbol}/waypoints"
localVarPath = strings.Replace(localVarPath, "{"+"systemSymbol"+"}", url.PathEscape(parameterValueToString(r.systemSymbol, "systemSymbol")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.page != nil {
parameterAddToQuery(localVarQueryParams, "page", r.page, "")
}
if r.limit != nil {
parameterAddToQuery(localVarQueryParams, "limit", r.limit, "")
}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
// set Content-Type header
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
if localVarHTTPContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
}
// to determine the Accept header
localVarHTTPHeaderAccepts := []string{"application/json"}
// set Accept header
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
if err != nil {
return localVarReturnValue, nil, err
}
localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, nil
}
type ApiGetSystemsRequest struct {
ctx context.Context
ApiService *SystemsApiService
page *int32
limit *int32
}
// What entry offset to request
func (r ApiGetSystemsRequest) Page(page int32) ApiGetSystemsRequest {
r.page = &page
return r
}
// How many entries to return per page
func (r ApiGetSystemsRequest) Limit(limit int32) ApiGetSystemsRequest {
r.limit = &limit
return r
}
func (r ApiGetSystemsRequest) Execute() (*GetSystems200Response, *http.Response, error) {
return r.ApiService.GetSystemsExecute(r)
}
/*
GetSystems List Systems
Return a list of all systems.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return ApiGetSystemsRequest
*/
func (a *SystemsApiService) GetSystems(ctx context.Context) ApiGetSystemsRequest {
return ApiGetSystemsRequest{
ApiService: a,
ctx: ctx,
}
}
// Execute executes the request
// @return GetSystems200Response
func (a *SystemsApiService) GetSystemsExecute(r ApiGetSystemsRequest) (*GetSystems200Response, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *GetSystems200Response
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SystemsApiService.GetSystems")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/systems"
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
if r.page != nil {
parameterAddToQuery(localVarQueryParams, "page", r.page, "")
}
if r.limit != nil {
parameterAddToQuery(localVarQueryParams, "limit", r.limit, "")
}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
// set Content-Type header
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
if localVarHTTPContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
}
// to determine the Accept header
localVarHTTPHeaderAccepts := []string{"application/json"}
// set Accept header
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
if err != nil {
return localVarReturnValue, nil, err
}
localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, nil
}
type ApiGetWaypointRequest struct {
ctx context.Context
ApiService *SystemsApiService
systemSymbol string
waypointSymbol string
}
func (r ApiGetWaypointRequest) Execute() (*GetWaypoint200Response, *http.Response, error) {
return r.ApiService.GetWaypointExecute(r)
}
/*
GetWaypoint Get Waypoint
View the details of a waypoint.
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@param systemSymbol The system symbol
@param waypointSymbol The waypoint symbol
@return ApiGetWaypointRequest
*/
func (a *SystemsApiService) GetWaypoint(ctx context.Context, systemSymbol string, waypointSymbol string) ApiGetWaypointRequest {
return ApiGetWaypointRequest{
ApiService: a,
ctx: ctx,
systemSymbol: systemSymbol,
waypointSymbol: waypointSymbol,
}
}
// Execute executes the request
// @return GetWaypoint200Response
func (a *SystemsApiService) GetWaypointExecute(r ApiGetWaypointRequest) (*GetWaypoint200Response, *http.Response, error) {
var (
localVarHTTPMethod = http.MethodGet
localVarPostBody interface{}
formFiles []formFile
localVarReturnValue *GetWaypoint200Response
)
localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SystemsApiService.GetWaypoint")
if err != nil {
return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()}
}
localVarPath := localBasePath + "/systems/{systemSymbol}/waypoints/{waypointSymbol}"
localVarPath = strings.Replace(localVarPath, "{"+"systemSymbol"+"}", url.PathEscape(parameterValueToString(r.systemSymbol, "systemSymbol")), -1)
localVarPath = strings.Replace(localVarPath, "{"+"waypointSymbol"+"}", url.PathEscape(parameterValueToString(r.waypointSymbol, "waypointSymbol")), -1)
localVarHeaderParams := make(map[string]string)
localVarQueryParams := url.Values{}
localVarFormParams := url.Values{}
// to determine the Content-Type header
localVarHTTPContentTypes := []string{}
// set Content-Type header
localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes)
if localVarHTTPContentType != "" {
localVarHeaderParams["Content-Type"] = localVarHTTPContentType
}
// to determine the Accept header
localVarHTTPHeaderAccepts := []string{"application/json"}
// set Accept header
localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts)
if localVarHTTPHeaderAccept != "" {
localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept
}
req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles)
if err != nil {
return localVarReturnValue, nil, err
}
localVarHTTPResponse, err := a.client.callAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}
localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body)
localVarHTTPResponse.Body.Close()
localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}
if localVarHTTPResponse.StatusCode >= 300 {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: localVarHTTPResponse.Status,
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := &GenericOpenAPIError{
body: localVarBody,
error: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}
return localVarReturnValue, localVarHTTPResponse, nil
}

676
client.go Normal file
View File

@ -0,0 +1,676 @@
/*
SpaceTraders API
SpaceTraders is an open-universe game and learning platform that offers a set of HTTP endpoints to control a fleet of ships and explore a multiplayer universe. The API is documented using [OpenAPI](https://github.com/SpaceTradersAPI/api-docs). You can send your first request right here in your browser to check the status of the game server. ```json http { \"method\": \"GET\", \"url\": \"https://api.spacetraders.io/v2\", } ``` Unlike a traditional game, SpaceTraders does not have a first-party client or app to play the game. Instead, you can use the API to build your own client, write a script to automate your ships, or try an app built by the community. We have a [Discord channel](https://discord.com/invite/jh6zurdWk5) where you can share your projects, ask questions, and get help from other players.
API version: 2.0.0
Contact: joel@spacetraders.io
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package models
import (
"bytes"
"context"
"encoding/json"
"encoding/xml"
"errors"
"fmt"
"io"
"io/ioutil"
"log"
"mime/multipart"
"net/http"
"net/http/httputil"
"net/url"
"os"
"path/filepath"
"reflect"
"regexp"
"strconv"
"strings"
"time"
"unicode/utf8"
)
var (
jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`)
xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`)
queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`)
queryDescape = strings.NewReplacer( "%5B", "[", "%5D", "]" )
)
// APIClient manages communication with the SpaceTraders API API v2.0.0
// In most cases there should be only one, shared, APIClient.
type APIClient struct {
cfg *Configuration
common service // Reuse a single struct instead of allocating one for each service on the heap.
// API Services
AgentsApi *AgentsApiService
ContractsApi *ContractsApiService
DefaultApi *DefaultApiService
FactionsApi *FactionsApiService
FleetApi *FleetApiService
SystemsApi *SystemsApiService
}
type service struct {
client *APIClient
}
// NewAPIClient creates a new API client. Requires a userAgent string describing your application.
// optionally a custom http.Client to allow for advanced features such as caching.
func NewAPIClient(cfg *Configuration) *APIClient {
if cfg.HTTPClient == nil {
cfg.HTTPClient = http.DefaultClient
}
c := &APIClient{}
c.cfg = cfg
c.common.client = c
// API Services
c.AgentsApi = (*AgentsApiService)(&c.common)
c.ContractsApi = (*ContractsApiService)(&c.common)
c.DefaultApi = (*DefaultApiService)(&c.common)
c.FactionsApi = (*FactionsApiService)(&c.common)
c.FleetApi = (*FleetApiService)(&c.common)
c.SystemsApi = (*SystemsApiService)(&c.common)
return c
}
func atoi(in string) (int, error) {
return strconv.Atoi(in)
}
// selectHeaderContentType select a content type from the available list.
func selectHeaderContentType(contentTypes []string) string {
if len(contentTypes) == 0 {
return ""
}
if contains(contentTypes, "application/json") {
return "application/json"
}
return contentTypes[0] // use the first content type specified in 'consumes'
}
// selectHeaderAccept join all accept types and return
func selectHeaderAccept(accepts []string) string {
if len(accepts) == 0 {
return ""
}
if contains(accepts, "application/json") {
return "application/json"
}
return strings.Join(accepts, ",")
}
// contains is a case insensitive match, finding needle in a haystack
func contains(haystack []string, needle string) bool {
for _, a := range haystack {
if strings.EqualFold(a, needle) {
return true
}
}
return false
}
// Verify optional parameters are of the correct type.
func typeCheckParameter(obj interface{}, expected string, name string) error {
// Make sure there is an object.
if obj == nil {
return nil
}
// Check the type is as expected.
if reflect.TypeOf(obj).String() != expected {
return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String())
}
return nil
}
func parameterValueToString( obj interface{}, key string ) string {
if reflect.TypeOf(obj).Kind() != reflect.Ptr {
return fmt.Sprintf("%v", obj)
}
var param,ok = obj.(MappedNullable)
if !ok {
return ""
}
dataMap,err := param.ToMap()
if err != nil {
return ""
}
return fmt.Sprintf("%v", dataMap[key])
}
// parameterAddToQuery adds the provided object to the url query supporting deep object syntax
func parameterAddToQuery(queryParams interface{}, keyPrefix string, obj interface{}, collectionType string) {
var v = reflect.ValueOf(obj)
var value = ""
if v == reflect.ValueOf(nil) {
value = "null"
} else {
switch v.Kind() {
case reflect.Invalid:
value = "invalid"
case reflect.Struct:
if t,ok := obj.(MappedNullable); ok {
dataMap,err := t.ToMap()
if err != nil {
return
}
parameterAddToQuery(queryParams, keyPrefix, dataMap, collectionType)
return
}
if t, ok := obj.(time.Time); ok {
parameterAddToQuery(queryParams, keyPrefix, t.Format(time.RFC3339), collectionType)
return
}
value = v.Type().String() + " value"
case reflect.Slice:
var indValue = reflect.ValueOf(obj)
if indValue == reflect.ValueOf(nil) {
return
}
var lenIndValue = indValue.Len()
for i:=0;i<lenIndValue;i++ {
var arrayValue = indValue.Index(i)
parameterAddToQuery(queryParams, keyPrefix, arrayValue.Interface(), collectionType)
}
return
case reflect.Map:
var indValue = reflect.ValueOf(obj)
if indValue == reflect.ValueOf(nil) {
return
}
iter := indValue.MapRange()
for iter.Next() {
k,v := iter.Key(), iter.Value()
parameterAddToQuery(queryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), collectionType)
}
return
case reflect.Interface:
fallthrough
case reflect.Ptr:
parameterAddToQuery(queryParams, keyPrefix, v.Elem().Interface(), collectionType)
return
case reflect.Int, reflect.Int8, reflect.Int16,
reflect.Int32, reflect.Int64:
value = strconv.FormatInt(v.Int(), 10)
case reflect.Uint, reflect.Uint8, reflect.Uint16,
reflect.Uint32, reflect.Uint64, reflect.Uintptr:
value = strconv.FormatUint(v.Uint(), 10)
case reflect.Float32, reflect.Float64:
value = strconv.FormatFloat(v.Float(), 'g', -1, 32)
case reflect.Bool:
value = strconv.FormatBool(v.Bool())
case reflect.String:
value = v.String()
default:
value = v.Type().String() + " value"
}
}
switch valuesMap := queryParams.(type) {
case url.Values:
if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" {
valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix) + "," + value)
} else {
valuesMap.Add(keyPrefix, value)
}
break
case map[string]string:
valuesMap[keyPrefix] = value
break
}
}
// helper for converting interface{} parameters to json strings
func parameterToJson(obj interface{}) (string, error) {
jsonBuf, err := json.Marshal(obj)
if err != nil {
return "", err
}
return string(jsonBuf), err
}
// callAPI do the request.
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
if c.cfg.Debug {
dump, err := httputil.DumpRequestOut(request, true)
if err != nil {
return nil, err
}
log.Printf("\n%s\n", string(dump))
}
resp, err := c.cfg.HTTPClient.Do(request)
if err != nil {
return resp, err
}
if c.cfg.Debug {
dump, err := httputil.DumpResponse(resp, true)
if err != nil {
return resp, err
}
log.Printf("\n%s\n", string(dump))
}
return resp, err
}
// Allow modification of underlying config for alternate implementations and testing
// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
func (c *APIClient) GetConfig() *Configuration {
return c.cfg
}
type formFile struct {
fileBytes []byte
fileName string
formFileName string
}
// prepareRequest build the request
func (c *APIClient) prepareRequest(
ctx context.Context,
path string, method string,
postBody interface{},
headerParams map[string]string,
queryParams url.Values,
formParams url.Values,
formFiles []formFile) (localVarRequest *http.Request, err error) {
var body *bytes.Buffer
// Detect postBody type and post.
if postBody != nil {
contentType := headerParams["Content-Type"]
if contentType == "" {
contentType = detectContentType(postBody)
headerParams["Content-Type"] = contentType
}
body, err = setBody(postBody, contentType)
if err != nil {
return nil, err
}
}
// add form parameters and file if available.
if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) {
if body != nil {
return nil, errors.New("Cannot specify postBody and multipart form at the same time.")
}
body = &bytes.Buffer{}
w := multipart.NewWriter(body)
for k, v := range formParams {
for _, iv := range v {
if strings.HasPrefix(k, "@") { // file
err = addFile(w, k[1:], iv)
if err != nil {
return nil, err
}
} else { // form value
w.WriteField(k, iv)
}
}
}
for _, formFile := range formFiles {
if len(formFile.fileBytes) > 0 && formFile.fileName != "" {
w.Boundary()
part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName))
if err != nil {
return nil, err
}
_, err = part.Write(formFile.fileBytes)
if err != nil {
return nil, err
}
}
}
// Set the Boundary in the Content-Type
headerParams["Content-Type"] = w.FormDataContentType()
// Set Content-Length
headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
w.Close()
}
if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 {
if body != nil {
return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.")
}
body = &bytes.Buffer{}
body.WriteString(formParams.Encode())
// Set Content-Length
headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
}
// Setup path and query parameters
url, err := url.Parse(path)
if err != nil {
return nil, err
}
// Override request host, if applicable
if c.cfg.Host != "" {
url.Host = c.cfg.Host
}
// Override request scheme, if applicable
if c.cfg.Scheme != "" {
url.Scheme = c.cfg.Scheme
}
// Adding Query Param
query := url.Query()
for k, v := range queryParams {
for _, iv := range v {
query.Add(k, iv)
}
}
// Encode the parameters.
url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string {
pieces := strings.Split(s, "=")
pieces[0] = queryDescape.Replace(pieces[0])
return strings.Join(pieces, "=")
})
// Generate a new request
if body != nil {
localVarRequest, err = http.NewRequest(method, url.String(), body)
} else {
localVarRequest, err = http.NewRequest(method, url.String(), nil)
}
if err != nil {
return nil, err
}
// add header parameters, if any
if len(headerParams) > 0 {
headers := http.Header{}
for h, v := range headerParams {
headers[h] = []string{v}
}
localVarRequest.Header = headers
}
// Add the user agent to the request.
localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent)
if ctx != nil {
// add context to the request
localVarRequest = localVarRequest.WithContext(ctx)
// Walk through any authentication.
// AccessToken Authentication
if auth, ok := ctx.Value(ContextAccessToken).(string); ok {
localVarRequest.Header.Add("Authorization", "Bearer "+auth)
}
}
for header, value := range c.cfg.DefaultHeader {
localVarRequest.Header.Add(header, value)
}
return localVarRequest, nil
}
func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) {
if len(b) == 0 {
return nil
}
if s, ok := v.(*string); ok {
*s = string(b)
return nil
}
if f, ok := v.(*os.File); ok {
f, err = ioutil.TempFile("", "HttpClientFile")
if err != nil {
return
}
_, err = f.Write(b)
if err != nil {
return
}
_, err = f.Seek(0, io.SeekStart)
return
}
if f, ok := v.(**os.File); ok {
*f, err = ioutil.TempFile("", "HttpClientFile")
if err != nil {
return
}
_, err = (*f).Write(b)
if err != nil {
return
}
_, err = (*f).Seek(0, io.SeekStart)
return
}
if xmlCheck.MatchString(contentType) {
if err = xml.Unmarshal(b, v); err != nil {
return err
}
return nil
}
if jsonCheck.MatchString(contentType) {
if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas
if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined
if err = unmarshalObj.UnmarshalJSON(b); err != nil {
return err
}
} else {
return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined")
}
} else if err = json.Unmarshal(b, v); err != nil { // simple model
return err
}
return nil
}
return errors.New("undefined response type")
}
// Add a file to the multipart request
func addFile(w *multipart.Writer, fieldName, path string) error {
file, err := os.Open(filepath.Clean(path))
if err != nil {
return err
}
err = file.Close()
if err != nil {
return err
}
part, err := w.CreateFormFile(fieldName, filepath.Base(path))
if err != nil {
return err
}
_, err = io.Copy(part, file)
return err
}
// Prevent trying to import "fmt"
func reportError(format string, a ...interface{}) error {
return fmt.Errorf(format, a...)
}
// A wrapper for strict JSON decoding
func newStrictDecoder(data []byte) *json.Decoder {
dec := json.NewDecoder(bytes.NewBuffer(data))
dec.DisallowUnknownFields()
return dec
}
// Set request body from an interface{}
func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) {
if bodyBuf == nil {
bodyBuf = &bytes.Buffer{}
}
if reader, ok := body.(io.Reader); ok {
_, err = bodyBuf.ReadFrom(reader)
} else if fp, ok := body.(*os.File); ok {
_, err = bodyBuf.ReadFrom(fp)
} else if b, ok := body.([]byte); ok {
_, err = bodyBuf.Write(b)
} else if s, ok := body.(string); ok {
_, err = bodyBuf.WriteString(s)
} else if s, ok := body.(*string); ok {
_, err = bodyBuf.WriteString(*s)
} else if jsonCheck.MatchString(contentType) {
err = json.NewEncoder(bodyBuf).Encode(body)
} else if xmlCheck.MatchString(contentType) {
err = xml.NewEncoder(bodyBuf).Encode(body)
}
if err != nil {
return nil, err
}
if bodyBuf.Len() == 0 {
err = fmt.Errorf("invalid body type %s\n", contentType)
return nil, err
}
return bodyBuf, nil
}
// detectContentType method is used to figure out `Request.Body` content type for request header
func detectContentType(body interface{}) string {
contentType := "text/plain; charset=utf-8"
kind := reflect.TypeOf(body).Kind()
switch kind {
case reflect.Struct, reflect.Map, reflect.Ptr:
contentType = "application/json; charset=utf-8"
case reflect.String:
contentType = "text/plain; charset=utf-8"
default:
if b, ok := body.([]byte); ok {
contentType = http.DetectContentType(b)
} else if kind == reflect.Slice {
contentType = "application/json; charset=utf-8"
}
}
return contentType
}
// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go
type cacheControl map[string]string
func parseCacheControl(headers http.Header) cacheControl {
cc := cacheControl{}
ccHeader := headers.Get("Cache-Control")
for _, part := range strings.Split(ccHeader, ",") {
part = strings.Trim(part, " ")
if part == "" {
continue
}
if strings.ContainsRune(part, '=') {
keyval := strings.Split(part, "=")
cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",")
} else {
cc[part] = ""
}
}
return cc
}
// CacheExpires helper function to determine remaining time before repeating a request.
func CacheExpires(r *http.Response) time.Time {
// Figure out when the cache expires.
var expires time.Time
now, err := time.Parse(time.RFC1123, r.Header.Get("date"))
if err != nil {
return time.Now()
}
respCacheControl := parseCacheControl(r.Header)
if maxAge, ok := respCacheControl["max-age"]; ok {
lifetime, err := time.ParseDuration(maxAge + "s")
if err != nil {
expires = now
} else {
expires = now.Add(lifetime)
}
} else {
expiresHeader := r.Header.Get("Expires")
if expiresHeader != "" {
expires, err = time.Parse(time.RFC1123, expiresHeader)
if err != nil {
expires = now
}
}
}
return expires
}
func strlen(s string) int {
return utf8.RuneCountInString(s)
}
// GenericOpenAPIError Provides access to the body, error and model on returned errors.
type GenericOpenAPIError struct {
body []byte
error string
model interface{}
}
// Error returns non-empty string if there was an error.
func (e GenericOpenAPIError) Error() string {
return e.error
}
// Body returns the raw bytes of the response
func (e GenericOpenAPIError) Body() []byte {
return e.body
}
// Model returns the unpacked model of the error
func (e GenericOpenAPIError) Model() interface{} {
return e.model
}
// format error message using title and detail when model implements rfc7807
func formatErrorMessage(status string, v interface{}) string {
str := ""
metaValue := reflect.ValueOf(v).Elem()
field := metaValue.FieldByName("Title")
if field != (reflect.Value{}) {
str = fmt.Sprintf("%s", field.Interface())
}
field = metaValue.FieldByName("Detail")
if field != (reflect.Value{}) {
str = fmt.Sprintf("%s (%s)", str, field.Interface())
}
// status title (detail)
return strings.TrimSpace(fmt.Sprintf("%s %s", status, str))
}

219
configuration.go Normal file
View File

@ -0,0 +1,219 @@
/*
SpaceTraders API
SpaceTraders is an open-universe game and learning platform that offers a set of HTTP endpoints to control a fleet of ships and explore a multiplayer universe. The API is documented using [OpenAPI](https://github.com/SpaceTradersAPI/api-docs). You can send your first request right here in your browser to check the status of the game server. ```json http { \"method\": \"GET\", \"url\": \"https://api.spacetraders.io/v2\", } ``` Unlike a traditional game, SpaceTraders does not have a first-party client or app to play the game. Instead, you can use the API to build your own client, write a script to automate your ships, or try an app built by the community. We have a [Discord channel](https://discord.com/invite/jh6zurdWk5) where you can share your projects, ask questions, and get help from other players.
API version: 2.0.0
Contact: joel@spacetraders.io
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package models
import (
"context"
"fmt"
"net/http"
"strings"
)
// contextKeys are used to identify the type of value in the context.
// Since these are string, it is possible to get a short description of the
// context key for logging and debugging using key.String().
type contextKey string
func (c contextKey) String() string {
return "auth " + string(c)
}
var (
// ContextAccessToken takes a string oauth2 access token as authentication for the request.
ContextAccessToken = contextKey("accesstoken")
// ContextServerIndex uses a server configuration from the index.
ContextServerIndex = contextKey("serverIndex")
// ContextOperationServerIndices uses a server configuration from the index mapping.
ContextOperationServerIndices = contextKey("serverOperationIndices")
// ContextServerVariables overrides a server configuration variables.
ContextServerVariables = contextKey("serverVariables")
// ContextOperationServerVariables overrides a server configuration variables using operation specific values.
ContextOperationServerVariables = contextKey("serverOperationVariables")
)
// BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type BasicAuth struct {
UserName string `json:"userName,omitempty"`
Password string `json:"password,omitempty"`
}
// APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIKey struct {
Key string
Prefix string
}
// ServerVariable stores the information about a server variable
type ServerVariable struct {
Description string
DefaultValue string
EnumValues []string
}
// ServerConfiguration stores the information about a server
type ServerConfiguration struct {
URL string
Description string
Variables map[string]ServerVariable
}
// ServerConfigurations stores multiple ServerConfiguration items
type ServerConfigurations []ServerConfiguration
// Configuration stores the configuration of the API client
type Configuration struct {
Host string `json:"host,omitempty"`
Scheme string `json:"scheme,omitempty"`
DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
UserAgent string `json:"userAgent,omitempty"`
Debug bool `json:"debug,omitempty"`
Servers ServerConfigurations
OperationServers map[string]ServerConfigurations
HTTPClient *http.Client
}
// NewConfiguration returns a new Configuration object
func NewConfiguration() *Configuration {
cfg := &Configuration{
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/2.0.0/go",
Debug: false,
Servers: ServerConfigurations{
{
URL: "https://api.spacetraders.io/v2",
Description: "v2",
},
},
OperationServers: map[string]ServerConfigurations{
},
}
return cfg
}
// AddDefaultHeader adds a new HTTP header to the default header in the request
func (c *Configuration) AddDefaultHeader(key string, value string) {
c.DefaultHeader[key] = value
}
// URL formats template on a index using given variables
func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) {
if index < 0 || len(sc) <= index {
return "", fmt.Errorf("index %v out of range %v", index, len(sc)-1)
}
server := sc[index]
url := server.URL
// go through variables and replace placeholders
for name, variable := range server.Variables {
if value, ok := variables[name]; ok {
found := bool(len(variable.EnumValues) == 0)
for _, enumValue := range variable.EnumValues {
if value == enumValue {
found = true
}
}
if !found {
return "", fmt.Errorf("the variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues)
}
url = strings.Replace(url, "{"+name+"}", value, -1)
} else {
url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1)
}
}
return url, nil
}
// ServerURL returns URL based on server settings
func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) {
return c.Servers.URL(index, variables)
}
func getServerIndex(ctx context.Context) (int, error) {
si := ctx.Value(ContextServerIndex)
if si != nil {
if index, ok := si.(int); ok {
return index, nil
}
return 0, reportError("Invalid type %T should be int", si)
}
return 0, nil
}
func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) {
osi := ctx.Value(ContextOperationServerIndices)
if osi != nil {
if operationIndices, ok := osi.(map[string]int); !ok {
return 0, reportError("Invalid type %T should be map[string]int", osi)
} else {
index, ok := operationIndices[endpoint]
if ok {
return index, nil
}
}
}
return getServerIndex(ctx)
}
func getServerVariables(ctx context.Context) (map[string]string, error) {
sv := ctx.Value(ContextServerVariables)
if sv != nil {
if variables, ok := sv.(map[string]string); ok {
return variables, nil
}
return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv)
}
return nil, nil
}
func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) {
osv := ctx.Value(ContextOperationServerVariables)
if osv != nil {
if operationVariables, ok := osv.(map[string]map[string]string); !ok {
return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv)
} else {
variables, ok := operationVariables[endpoint]
if ok {
return variables, nil
}
}
}
return getServerVariables(ctx)
}
// ServerURLWithContext returns a new server URL given an endpoint
func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) {
sc, ok := c.OperationServers[endpoint]
if !ok {
sc = c.Servers
}
if ctx == nil {
return sc.URL(0, nil)
}
index, err := getServerOperationIndex(ctx, endpoint)
if err != nil {
return "", err
}
variables, err := getServerOperationVariables(ctx, endpoint)
if err != nil {
return "", err
}
return sc.URL(index, variables)
}

View File

@ -0,0 +1,51 @@
# AcceptContract200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**AcceptContract200ResponseData**](AcceptContract200ResponseData.md) | |
## Methods
### NewAcceptContract200Response
`func NewAcceptContract200Response(data AcceptContract200ResponseData, ) *AcceptContract200Response`
NewAcceptContract200Response instantiates a new AcceptContract200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewAcceptContract200ResponseWithDefaults
`func NewAcceptContract200ResponseWithDefaults() *AcceptContract200Response`
NewAcceptContract200ResponseWithDefaults instantiates a new AcceptContract200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *AcceptContract200Response) GetData() AcceptContract200ResponseData`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *AcceptContract200Response) GetDataOk() (*AcceptContract200ResponseData, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *AcceptContract200Response) SetData(v AcceptContract200ResponseData)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,72 @@
# AcceptContract200ResponseData
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Agent** | [**Agent**](Agent.md) | |
**Contract** | [**Contract**](Contract.md) | |
## Methods
### NewAcceptContract200ResponseData
`func NewAcceptContract200ResponseData(agent Agent, contract Contract, ) *AcceptContract200ResponseData`
NewAcceptContract200ResponseData instantiates a new AcceptContract200ResponseData object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewAcceptContract200ResponseDataWithDefaults
`func NewAcceptContract200ResponseDataWithDefaults() *AcceptContract200ResponseData`
NewAcceptContract200ResponseDataWithDefaults instantiates a new AcceptContract200ResponseData object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetAgent
`func (o *AcceptContract200ResponseData) GetAgent() Agent`
GetAgent returns the Agent field if non-nil, zero value otherwise.
### GetAgentOk
`func (o *AcceptContract200ResponseData) GetAgentOk() (*Agent, bool)`
GetAgentOk returns a tuple with the Agent field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetAgent
`func (o *AcceptContract200ResponseData) SetAgent(v Agent)`
SetAgent sets Agent field to given value.
### GetContract
`func (o *AcceptContract200ResponseData) GetContract() Contract`
GetContract returns the Contract field if non-nil, zero value otherwise.
### GetContractOk
`func (o *AcceptContract200ResponseData) GetContractOk() (*Contract, bool)`
GetContractOk returns a tuple with the Contract field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetContract
`func (o *AcceptContract200ResponseData) SetContract(v Contract)`
SetContract sets Contract field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

114
docs/Agent.md Normal file
View File

@ -0,0 +1,114 @@
# Agent
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**AccountId** | **string** | |
**Symbol** | **string** | |
**Headquarters** | **string** | The headquarters of the agent. |
**Credits** | **int32** | The number of credits the agent has available. Credits can be negative if funds have been overdrawn. |
## Methods
### NewAgent
`func NewAgent(accountId string, symbol string, headquarters string, credits int32, ) *Agent`
NewAgent instantiates a new Agent object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewAgentWithDefaults
`func NewAgentWithDefaults() *Agent`
NewAgentWithDefaults instantiates a new Agent object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetAccountId
`func (o *Agent) GetAccountId() string`
GetAccountId returns the AccountId field if non-nil, zero value otherwise.
### GetAccountIdOk
`func (o *Agent) GetAccountIdOk() (*string, bool)`
GetAccountIdOk returns a tuple with the AccountId field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetAccountId
`func (o *Agent) SetAccountId(v string)`
SetAccountId sets AccountId field to given value.
### GetSymbol
`func (o *Agent) GetSymbol() string`
GetSymbol returns the Symbol field if non-nil, zero value otherwise.
### GetSymbolOk
`func (o *Agent) GetSymbolOk() (*string, bool)`
GetSymbolOk returns a tuple with the Symbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSymbol
`func (o *Agent) SetSymbol(v string)`
SetSymbol sets Symbol field to given value.
### GetHeadquarters
`func (o *Agent) GetHeadquarters() string`
GetHeadquarters returns the Headquarters field if non-nil, zero value otherwise.
### GetHeadquartersOk
`func (o *Agent) GetHeadquartersOk() (*string, bool)`
GetHeadquartersOk returns a tuple with the Headquarters field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetHeadquarters
`func (o *Agent) SetHeadquarters(v string)`
SetHeadquarters sets Headquarters field to given value.
### GetCredits
`func (o *Agent) GetCredits() int32`
GetCredits returns the Credits field if non-nil, zero value otherwise.
### GetCreditsOk
`func (o *Agent) GetCreditsOk() (*int32, bool)`
GetCreditsOk returns a tuple with the Credits field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCredits
`func (o *Agent) SetCredits(v int32)`
SetCredits sets Credits field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

70
docs/AgentsApi.md Normal file
View File

@ -0,0 +1,70 @@
# \AgentsApi
All URIs are relative to *https://api.spacetraders.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**GetMyAgent**](AgentsApi.md#GetMyAgent) | **Get** /my/agent | My Agent Details
## GetMyAgent
> GetMyAgent200Response GetMyAgent(ctx).Execute()
My Agent Details
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AgentsApi.GetMyAgent(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AgentsApi.GetMyAgent``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetMyAgent`: GetMyAgent200Response
fmt.Fprintf(os.Stdout, "Response from `AgentsApi.GetMyAgent`: %v\n", resp)
}
```
### Path Parameters
This endpoint does not need any parameter.
### Other Parameters
Other parameters are passed through a pointer to a apiGetMyAgentRequest struct via the builder pattern
### Return type
[**GetMyAgent200Response**](GetMyAgent200Response.md)
### Authorization
[AgentToken](../README.md#AgentToken)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)

108
docs/Chart.md Normal file
View File

@ -0,0 +1,108 @@
# Chart
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**WaypointSymbol** | Pointer to **string** | | [optional]
**SubmittedBy** | Pointer to **string** | | [optional]
**SubmittedOn** | Pointer to **time.Time** | | [optional]
## Methods
### NewChart
`func NewChart() *Chart`
NewChart instantiates a new Chart object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewChartWithDefaults
`func NewChartWithDefaults() *Chart`
NewChartWithDefaults instantiates a new Chart object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetWaypointSymbol
`func (o *Chart) GetWaypointSymbol() string`
GetWaypointSymbol returns the WaypointSymbol field if non-nil, zero value otherwise.
### GetWaypointSymbolOk
`func (o *Chart) GetWaypointSymbolOk() (*string, bool)`
GetWaypointSymbolOk returns a tuple with the WaypointSymbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetWaypointSymbol
`func (o *Chart) SetWaypointSymbol(v string)`
SetWaypointSymbol sets WaypointSymbol field to given value.
### HasWaypointSymbol
`func (o *Chart) HasWaypointSymbol() bool`
HasWaypointSymbol returns a boolean if a field has been set.
### GetSubmittedBy
`func (o *Chart) GetSubmittedBy() string`
GetSubmittedBy returns the SubmittedBy field if non-nil, zero value otherwise.
### GetSubmittedByOk
`func (o *Chart) GetSubmittedByOk() (*string, bool)`
GetSubmittedByOk returns a tuple with the SubmittedBy field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSubmittedBy
`func (o *Chart) SetSubmittedBy(v string)`
SetSubmittedBy sets SubmittedBy field to given value.
### HasSubmittedBy
`func (o *Chart) HasSubmittedBy() bool`
HasSubmittedBy returns a boolean if a field has been set.
### GetSubmittedOn
`func (o *Chart) GetSubmittedOn() time.Time`
GetSubmittedOn returns the SubmittedOn field if non-nil, zero value otherwise.
### GetSubmittedOnOk
`func (o *Chart) GetSubmittedOnOk() (*time.Time, bool)`
GetSubmittedOnOk returns a tuple with the SubmittedOn field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSubmittedOn
`func (o *Chart) SetSubmittedOn(v time.Time)`
SetSubmittedOn sets SubmittedOn field to given value.
### HasSubmittedOn
`func (o *Chart) HasSubmittedOn() bool`
HasSubmittedOn returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

182
docs/ConnectedSystem.md Normal file
View File

@ -0,0 +1,182 @@
# ConnectedSystem
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Symbol** | **string** | |
**SectorSymbol** | **string** | |
**Type** | [**SystemType**](SystemType.md) | |
**FactionSymbol** | Pointer to **string** | The symbol of the faction that owns the connected jump gate in the system. | [optional]
**X** | **int32** | |
**Y** | **int32** | |
**Distance** | **int32** | |
## Methods
### NewConnectedSystem
`func NewConnectedSystem(symbol string, sectorSymbol string, type_ SystemType, x int32, y int32, distance int32, ) *ConnectedSystem`
NewConnectedSystem instantiates a new ConnectedSystem object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewConnectedSystemWithDefaults
`func NewConnectedSystemWithDefaults() *ConnectedSystem`
NewConnectedSystemWithDefaults instantiates a new ConnectedSystem object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetSymbol
`func (o *ConnectedSystem) GetSymbol() string`
GetSymbol returns the Symbol field if non-nil, zero value otherwise.
### GetSymbolOk
`func (o *ConnectedSystem) GetSymbolOk() (*string, bool)`
GetSymbolOk returns a tuple with the Symbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSymbol
`func (o *ConnectedSystem) SetSymbol(v string)`
SetSymbol sets Symbol field to given value.
### GetSectorSymbol
`func (o *ConnectedSystem) GetSectorSymbol() string`
GetSectorSymbol returns the SectorSymbol field if non-nil, zero value otherwise.
### GetSectorSymbolOk
`func (o *ConnectedSystem) GetSectorSymbolOk() (*string, bool)`
GetSectorSymbolOk returns a tuple with the SectorSymbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSectorSymbol
`func (o *ConnectedSystem) SetSectorSymbol(v string)`
SetSectorSymbol sets SectorSymbol field to given value.
### GetType
`func (o *ConnectedSystem) GetType() SystemType`
GetType returns the Type field if non-nil, zero value otherwise.
### GetTypeOk
`func (o *ConnectedSystem) GetTypeOk() (*SystemType, bool)`
GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetType
`func (o *ConnectedSystem) SetType(v SystemType)`
SetType sets Type field to given value.
### GetFactionSymbol
`func (o *ConnectedSystem) GetFactionSymbol() string`
GetFactionSymbol returns the FactionSymbol field if non-nil, zero value otherwise.
### GetFactionSymbolOk
`func (o *ConnectedSystem) GetFactionSymbolOk() (*string, bool)`
GetFactionSymbolOk returns a tuple with the FactionSymbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetFactionSymbol
`func (o *ConnectedSystem) SetFactionSymbol(v string)`
SetFactionSymbol sets FactionSymbol field to given value.
### HasFactionSymbol
`func (o *ConnectedSystem) HasFactionSymbol() bool`
HasFactionSymbol returns a boolean if a field has been set.
### GetX
`func (o *ConnectedSystem) GetX() int32`
GetX returns the X field if non-nil, zero value otherwise.
### GetXOk
`func (o *ConnectedSystem) GetXOk() (*int32, bool)`
GetXOk returns a tuple with the X field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetX
`func (o *ConnectedSystem) SetX(v int32)`
SetX sets X field to given value.
### GetY
`func (o *ConnectedSystem) GetY() int32`
GetY returns the Y field if non-nil, zero value otherwise.
### GetYOk
`func (o *ConnectedSystem) GetYOk() (*int32, bool)`
GetYOk returns a tuple with the Y field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetY
`func (o *ConnectedSystem) SetY(v int32)`
SetY sets Y field to given value.
### GetDistance
`func (o *ConnectedSystem) GetDistance() int32`
GetDistance returns the Distance field if non-nil, zero value otherwise.
### GetDistanceOk
`func (o *ConnectedSystem) GetDistanceOk() (*int32, bool)`
GetDistanceOk returns a tuple with the Distance field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDistance
`func (o *ConnectedSystem) SetDistance(v int32)`
SetDistance sets Distance field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

177
docs/Contract.md Normal file
View File

@ -0,0 +1,177 @@
# Contract
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Id** | **string** | |
**FactionSymbol** | **string** | The symbol of the faction that this contract is for. |
**Type** | **string** | |
**Terms** | [**ContractTerms**](ContractTerms.md) | |
**Accepted** | **bool** | Whether the contract has been accepted by the agent | [default to false]
**Fulfilled** | **bool** | Whether the contract has been fulfilled | [default to false]
**Expiration** | **time.Time** | The time at which the contract expires |
## Methods
### NewContract
`func NewContract(id string, factionSymbol string, type_ string, terms ContractTerms, accepted bool, fulfilled bool, expiration time.Time, ) *Contract`
NewContract instantiates a new Contract object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewContractWithDefaults
`func NewContractWithDefaults() *Contract`
NewContractWithDefaults instantiates a new Contract object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetId
`func (o *Contract) GetId() string`
GetId returns the Id field if non-nil, zero value otherwise.
### GetIdOk
`func (o *Contract) GetIdOk() (*string, bool)`
GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetId
`func (o *Contract) SetId(v string)`
SetId sets Id field to given value.
### GetFactionSymbol
`func (o *Contract) GetFactionSymbol() string`
GetFactionSymbol returns the FactionSymbol field if non-nil, zero value otherwise.
### GetFactionSymbolOk
`func (o *Contract) GetFactionSymbolOk() (*string, bool)`
GetFactionSymbolOk returns a tuple with the FactionSymbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetFactionSymbol
`func (o *Contract) SetFactionSymbol(v string)`
SetFactionSymbol sets FactionSymbol field to given value.
### GetType
`func (o *Contract) GetType() string`
GetType returns the Type field if non-nil, zero value otherwise.
### GetTypeOk
`func (o *Contract) GetTypeOk() (*string, bool)`
GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetType
`func (o *Contract) SetType(v string)`
SetType sets Type field to given value.
### GetTerms
`func (o *Contract) GetTerms() ContractTerms`
GetTerms returns the Terms field if non-nil, zero value otherwise.
### GetTermsOk
`func (o *Contract) GetTermsOk() (*ContractTerms, bool)`
GetTermsOk returns a tuple with the Terms field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetTerms
`func (o *Contract) SetTerms(v ContractTerms)`
SetTerms sets Terms field to given value.
### GetAccepted
`func (o *Contract) GetAccepted() bool`
GetAccepted returns the Accepted field if non-nil, zero value otherwise.
### GetAcceptedOk
`func (o *Contract) GetAcceptedOk() (*bool, bool)`
GetAcceptedOk returns a tuple with the Accepted field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetAccepted
`func (o *Contract) SetAccepted(v bool)`
SetAccepted sets Accepted field to given value.
### GetFulfilled
`func (o *Contract) GetFulfilled() bool`
GetFulfilled returns the Fulfilled field if non-nil, zero value otherwise.
### GetFulfilledOk
`func (o *Contract) GetFulfilledOk() (*bool, bool)`
GetFulfilledOk returns a tuple with the Fulfilled field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetFulfilled
`func (o *Contract) SetFulfilled(v bool)`
SetFulfilled sets Fulfilled field to given value.
### GetExpiration
`func (o *Contract) GetExpiration() time.Time`
GetExpiration returns the Expiration field if non-nil, zero value otherwise.
### GetExpirationOk
`func (o *Contract) GetExpirationOk() (*time.Time, bool)`
GetExpirationOk returns a tuple with the Expiration field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetExpiration
`func (o *Contract) SetExpiration(v time.Time)`
SetExpiration sets Expiration field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

114
docs/ContractDeliverGood.md Normal file
View File

@ -0,0 +1,114 @@
# ContractDeliverGood
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**TradeSymbol** | **string** | The symbol of the trade good to deliver. |
**DestinationSymbol** | **string** | The destination where goods need to be delivered. |
**UnitsRequired** | **int32** | The number of units that need to be delivered on this contract. |
**UnitsFulfilled** | **int32** | The number of units fulfilled on this contract. |
## Methods
### NewContractDeliverGood
`func NewContractDeliverGood(tradeSymbol string, destinationSymbol string, unitsRequired int32, unitsFulfilled int32, ) *ContractDeliverGood`
NewContractDeliverGood instantiates a new ContractDeliverGood object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewContractDeliverGoodWithDefaults
`func NewContractDeliverGoodWithDefaults() *ContractDeliverGood`
NewContractDeliverGoodWithDefaults instantiates a new ContractDeliverGood object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetTradeSymbol
`func (o *ContractDeliverGood) GetTradeSymbol() string`
GetTradeSymbol returns the TradeSymbol field if non-nil, zero value otherwise.
### GetTradeSymbolOk
`func (o *ContractDeliverGood) GetTradeSymbolOk() (*string, bool)`
GetTradeSymbolOk returns a tuple with the TradeSymbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetTradeSymbol
`func (o *ContractDeliverGood) SetTradeSymbol(v string)`
SetTradeSymbol sets TradeSymbol field to given value.
### GetDestinationSymbol
`func (o *ContractDeliverGood) GetDestinationSymbol() string`
GetDestinationSymbol returns the DestinationSymbol field if non-nil, zero value otherwise.
### GetDestinationSymbolOk
`func (o *ContractDeliverGood) GetDestinationSymbolOk() (*string, bool)`
GetDestinationSymbolOk returns a tuple with the DestinationSymbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDestinationSymbol
`func (o *ContractDeliverGood) SetDestinationSymbol(v string)`
SetDestinationSymbol sets DestinationSymbol field to given value.
### GetUnitsRequired
`func (o *ContractDeliverGood) GetUnitsRequired() int32`
GetUnitsRequired returns the UnitsRequired field if non-nil, zero value otherwise.
### GetUnitsRequiredOk
`func (o *ContractDeliverGood) GetUnitsRequiredOk() (*int32, bool)`
GetUnitsRequiredOk returns a tuple with the UnitsRequired field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetUnitsRequired
`func (o *ContractDeliverGood) SetUnitsRequired(v int32)`
SetUnitsRequired sets UnitsRequired field to given value.
### GetUnitsFulfilled
`func (o *ContractDeliverGood) GetUnitsFulfilled() int32`
GetUnitsFulfilled returns the UnitsFulfilled field if non-nil, zero value otherwise.
### GetUnitsFulfilledOk
`func (o *ContractDeliverGood) GetUnitsFulfilledOk() (*int32, bool)`
GetUnitsFulfilledOk returns a tuple with the UnitsFulfilled field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetUnitsFulfilled
`func (o *ContractDeliverGood) SetUnitsFulfilled(v int32)`
SetUnitsFulfilled sets UnitsFulfilled field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

72
docs/ContractPayment.md Normal file
View File

@ -0,0 +1,72 @@
# ContractPayment
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**OnAccepted** | **int32** | The amount of credits received up front for accepting the contract. |
**OnFulfilled** | **int32** | The amount of credits received when the contract is fulfilled. |
## Methods
### NewContractPayment
`func NewContractPayment(onAccepted int32, onFulfilled int32, ) *ContractPayment`
NewContractPayment instantiates a new ContractPayment object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewContractPaymentWithDefaults
`func NewContractPaymentWithDefaults() *ContractPayment`
NewContractPaymentWithDefaults instantiates a new ContractPayment object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetOnAccepted
`func (o *ContractPayment) GetOnAccepted() int32`
GetOnAccepted returns the OnAccepted field if non-nil, zero value otherwise.
### GetOnAcceptedOk
`func (o *ContractPayment) GetOnAcceptedOk() (*int32, bool)`
GetOnAcceptedOk returns a tuple with the OnAccepted field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetOnAccepted
`func (o *ContractPayment) SetOnAccepted(v int32)`
SetOnAccepted sets OnAccepted field to given value.
### GetOnFulfilled
`func (o *ContractPayment) GetOnFulfilled() int32`
GetOnFulfilled returns the OnFulfilled field if non-nil, zero value otherwise.
### GetOnFulfilledOk
`func (o *ContractPayment) GetOnFulfilledOk() (*int32, bool)`
GetOnFulfilledOk returns a tuple with the OnFulfilled field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetOnFulfilled
`func (o *ContractPayment) SetOnFulfilled(v int32)`
SetOnFulfilled sets OnFulfilled field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

98
docs/ContractTerms.md Normal file
View File

@ -0,0 +1,98 @@
# ContractTerms
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Deadline** | **time.Time** | The deadline for the contract. |
**Payment** | [**ContractPayment**](ContractPayment.md) | |
**Deliver** | Pointer to [**[]ContractDeliverGood**](ContractDeliverGood.md) | | [optional]
## Methods
### NewContractTerms
`func NewContractTerms(deadline time.Time, payment ContractPayment, ) *ContractTerms`
NewContractTerms instantiates a new ContractTerms object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewContractTermsWithDefaults
`func NewContractTermsWithDefaults() *ContractTerms`
NewContractTermsWithDefaults instantiates a new ContractTerms object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetDeadline
`func (o *ContractTerms) GetDeadline() time.Time`
GetDeadline returns the Deadline field if non-nil, zero value otherwise.
### GetDeadlineOk
`func (o *ContractTerms) GetDeadlineOk() (*time.Time, bool)`
GetDeadlineOk returns a tuple with the Deadline field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDeadline
`func (o *ContractTerms) SetDeadline(v time.Time)`
SetDeadline sets Deadline field to given value.
### GetPayment
`func (o *ContractTerms) GetPayment() ContractPayment`
GetPayment returns the Payment field if non-nil, zero value otherwise.
### GetPaymentOk
`func (o *ContractTerms) GetPaymentOk() (*ContractPayment, bool)`
GetPaymentOk returns a tuple with the Payment field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetPayment
`func (o *ContractTerms) SetPayment(v ContractPayment)`
SetPayment sets Payment field to given value.
### GetDeliver
`func (o *ContractTerms) GetDeliver() []ContractDeliverGood`
GetDeliver returns the Deliver field if non-nil, zero value otherwise.
### GetDeliverOk
`func (o *ContractTerms) GetDeliverOk() (*[]ContractDeliverGood, bool)`
GetDeliverOk returns a tuple with the Deliver field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDeliver
`func (o *ContractTerms) SetDeliver(v []ContractDeliverGood)`
SetDeliver sets Deliver field to given value.
### HasDeliver
`func (o *ContractTerms) HasDeliver() bool`
HasDeliver returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

363
docs/ContractsApi.md Normal file
View File

@ -0,0 +1,363 @@
# \ContractsApi
All URIs are relative to *https://api.spacetraders.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**AcceptContract**](ContractsApi.md#AcceptContract) | **Post** /my/contracts/{contractId}/accept | Accept Contract
[**DeliverContract**](ContractsApi.md#DeliverContract) | **Post** /my/contracts/{contractId}/deliver | Deliver Contract
[**FulfillContract**](ContractsApi.md#FulfillContract) | **Post** /my/contracts/{contractId}/fulfill | Fulfill Contract
[**GetContract**](ContractsApi.md#GetContract) | **Get** /my/contracts/{contractId} | Get Contract
[**GetContracts**](ContractsApi.md#GetContracts) | **Get** /my/contracts | List Contracts
## AcceptContract
> AcceptContract200Response AcceptContract(ctx, contractId).Execute()
Accept Contract
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
contractId := "contractId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ContractsApi.AcceptContract(context.Background(), contractId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ContractsApi.AcceptContract``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AcceptContract`: AcceptContract200Response
fmt.Fprintf(os.Stdout, "Response from `ContractsApi.AcceptContract`: %v\n", resp)
}
```
### Path Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**contractId** | **string** | |
### Other Parameters
Other parameters are passed through a pointer to a apiAcceptContractRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
### Return type
[**AcceptContract200Response**](AcceptContract200Response.md)
### Authorization
[AgentToken](../README.md#AgentToken)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)
## DeliverContract
> DeliverContract200Response DeliverContract(ctx, contractId).DeliverContractRequest(deliverContractRequest).Execute()
Deliver Contract
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
contractId := "contractId_example" // string | The ID of the contract
deliverContractRequest := *openapiclient.NewDeliverContractRequest("ShipSymbol_example", "TradeSymbol_example", int32(123)) // DeliverContractRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ContractsApi.DeliverContract(context.Background(), contractId).DeliverContractRequest(deliverContractRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ContractsApi.DeliverContract``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeliverContract`: DeliverContract200Response
fmt.Fprintf(os.Stdout, "Response from `ContractsApi.DeliverContract`: %v\n", resp)
}
```
### Path Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**contractId** | **string** | The ID of the contract |
### Other Parameters
Other parameters are passed through a pointer to a apiDeliverContractRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**deliverContractRequest** | [**DeliverContractRequest**](DeliverContractRequest.md) | |
### Return type
[**DeliverContract200Response**](DeliverContract200Response.md)
### Authorization
[AgentToken](../README.md#AgentToken)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)
## FulfillContract
> FulfillContract200Response FulfillContract(ctx, contractId).Execute()
Fulfill Contract
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
contractId := "contractId_example" // string | The ID of the contract
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ContractsApi.FulfillContract(context.Background(), contractId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ContractsApi.FulfillContract``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `FulfillContract`: FulfillContract200Response
fmt.Fprintf(os.Stdout, "Response from `ContractsApi.FulfillContract`: %v\n", resp)
}
```
### Path Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**contractId** | **string** | The ID of the contract |
### Other Parameters
Other parameters are passed through a pointer to a apiFulfillContractRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
### Return type
[**FulfillContract200Response**](FulfillContract200Response.md)
### Authorization
[AgentToken](../README.md#AgentToken)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)
## GetContract
> GetContract200Response GetContract(ctx, contractId).Execute()
Get Contract
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
contractId := "contractId_example" // string | The contract ID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ContractsApi.GetContract(context.Background(), contractId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ContractsApi.GetContract``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetContract`: GetContract200Response
fmt.Fprintf(os.Stdout, "Response from `ContractsApi.GetContract`: %v\n", resp)
}
```
### Path Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**contractId** | **string** | The contract ID |
### Other Parameters
Other parameters are passed through a pointer to a apiGetContractRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
### Return type
[**GetContract200Response**](GetContract200Response.md)
### Authorization
[AgentToken](../README.md#AgentToken)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)
## GetContracts
> GetContracts200Response GetContracts(ctx).Page(page).Limit(limit).Execute()
List Contracts
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
page := int32(56) // int32 | What entry offset to request (optional)
limit := int32(56) // int32 | How many entries to return per page (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ContractsApi.GetContracts(context.Background()).Page(page).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ContractsApi.GetContracts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetContracts`: GetContracts200Response
fmt.Fprintf(os.Stdout, "Response from `ContractsApi.GetContracts`: %v\n", resp)
}
```
### Path Parameters
### Other Parameters
Other parameters are passed through a pointer to a apiGetContractsRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**page** | **int32** | What entry offset to request |
**limit** | **int32** | How many entries to return per page |
### Return type
[**GetContracts200Response**](GetContracts200Response.md)
### Authorization
[AgentToken](../README.md#AgentToken)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)

114
docs/Cooldown.md Normal file
View File

@ -0,0 +1,114 @@
# Cooldown
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ShipSymbol** | **string** | The symbol of the ship that is on cooldown |
**TotalSeconds** | **int32** | The total duration of the cooldown in seconds |
**RemainingSeconds** | **int32** | The remaining duration of the cooldown in seconds |
**Expiration** | **time.Time** | The date and time when the cooldown expires in ISO 8601 format |
## Methods
### NewCooldown
`func NewCooldown(shipSymbol string, totalSeconds int32, remainingSeconds int32, expiration time.Time, ) *Cooldown`
NewCooldown instantiates a new Cooldown object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewCooldownWithDefaults
`func NewCooldownWithDefaults() *Cooldown`
NewCooldownWithDefaults instantiates a new Cooldown object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetShipSymbol
`func (o *Cooldown) GetShipSymbol() string`
GetShipSymbol returns the ShipSymbol field if non-nil, zero value otherwise.
### GetShipSymbolOk
`func (o *Cooldown) GetShipSymbolOk() (*string, bool)`
GetShipSymbolOk returns a tuple with the ShipSymbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetShipSymbol
`func (o *Cooldown) SetShipSymbol(v string)`
SetShipSymbol sets ShipSymbol field to given value.
### GetTotalSeconds
`func (o *Cooldown) GetTotalSeconds() int32`
GetTotalSeconds returns the TotalSeconds field if non-nil, zero value otherwise.
### GetTotalSecondsOk
`func (o *Cooldown) GetTotalSecondsOk() (*int32, bool)`
GetTotalSecondsOk returns a tuple with the TotalSeconds field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetTotalSeconds
`func (o *Cooldown) SetTotalSeconds(v int32)`
SetTotalSeconds sets TotalSeconds field to given value.
### GetRemainingSeconds
`func (o *Cooldown) GetRemainingSeconds() int32`
GetRemainingSeconds returns the RemainingSeconds field if non-nil, zero value otherwise.
### GetRemainingSecondsOk
`func (o *Cooldown) GetRemainingSecondsOk() (*int32, bool)`
GetRemainingSecondsOk returns a tuple with the RemainingSeconds field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetRemainingSeconds
`func (o *Cooldown) SetRemainingSeconds(v int32)`
SetRemainingSeconds sets RemainingSeconds field to given value.
### GetExpiration
`func (o *Cooldown) GetExpiration() time.Time`
GetExpiration returns the Expiration field if non-nil, zero value otherwise.
### GetExpirationOk
`func (o *Cooldown) GetExpirationOk() (*time.Time, bool)`
GetExpirationOk returns a tuple with the Expiration field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetExpiration
`func (o *Cooldown) SetExpiration(v time.Time)`
SetExpiration sets Expiration field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# CreateChart201Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**CreateChart201ResponseData**](CreateChart201ResponseData.md) | |
## Methods
### NewCreateChart201Response
`func NewCreateChart201Response(data CreateChart201ResponseData, ) *CreateChart201Response`
NewCreateChart201Response instantiates a new CreateChart201Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewCreateChart201ResponseWithDefaults
`func NewCreateChart201ResponseWithDefaults() *CreateChart201Response`
NewCreateChart201ResponseWithDefaults instantiates a new CreateChart201Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *CreateChart201Response) GetData() CreateChart201ResponseData`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *CreateChart201Response) GetDataOk() (*CreateChart201ResponseData, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *CreateChart201Response) SetData(v CreateChart201ResponseData)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,72 @@
# CreateChart201ResponseData
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Chart** | [**Chart**](Chart.md) | |
**Waypoint** | [**Waypoint**](Waypoint.md) | |
## Methods
### NewCreateChart201ResponseData
`func NewCreateChart201ResponseData(chart Chart, waypoint Waypoint, ) *CreateChart201ResponseData`
NewCreateChart201ResponseData instantiates a new CreateChart201ResponseData object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewCreateChart201ResponseDataWithDefaults
`func NewCreateChart201ResponseDataWithDefaults() *CreateChart201ResponseData`
NewCreateChart201ResponseDataWithDefaults instantiates a new CreateChart201ResponseData object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetChart
`func (o *CreateChart201ResponseData) GetChart() Chart`
GetChart returns the Chart field if non-nil, zero value otherwise.
### GetChartOk
`func (o *CreateChart201ResponseData) GetChartOk() (*Chart, bool)`
GetChartOk returns a tuple with the Chart field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetChart
`func (o *CreateChart201ResponseData) SetChart(v Chart)`
SetChart sets Chart field to given value.
### GetWaypoint
`func (o *CreateChart201ResponseData) GetWaypoint() Waypoint`
GetWaypoint returns the Waypoint field if non-nil, zero value otherwise.
### GetWaypointOk
`func (o *CreateChart201ResponseData) GetWaypointOk() (*Waypoint, bool)`
GetWaypointOk returns a tuple with the Waypoint field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetWaypoint
`func (o *CreateChart201ResponseData) SetWaypoint(v Waypoint)`
SetWaypoint sets Waypoint field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# CreateShipShipScan201Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**CreateShipShipScan201ResponseData**](CreateShipShipScan201ResponseData.md) | |
## Methods
### NewCreateShipShipScan201Response
`func NewCreateShipShipScan201Response(data CreateShipShipScan201ResponseData, ) *CreateShipShipScan201Response`
NewCreateShipShipScan201Response instantiates a new CreateShipShipScan201Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewCreateShipShipScan201ResponseWithDefaults
`func NewCreateShipShipScan201ResponseWithDefaults() *CreateShipShipScan201Response`
NewCreateShipShipScan201ResponseWithDefaults instantiates a new CreateShipShipScan201Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *CreateShipShipScan201Response) GetData() CreateShipShipScan201ResponseData`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *CreateShipShipScan201Response) GetDataOk() (*CreateShipShipScan201ResponseData, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *CreateShipShipScan201Response) SetData(v CreateShipShipScan201ResponseData)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,72 @@
# CreateShipShipScan201ResponseData
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Cooldown** | [**Cooldown**](Cooldown.md) | |
**Ships** | [**[]ScannedShip**](ScannedShip.md) | |
## Methods
### NewCreateShipShipScan201ResponseData
`func NewCreateShipShipScan201ResponseData(cooldown Cooldown, ships []ScannedShip, ) *CreateShipShipScan201ResponseData`
NewCreateShipShipScan201ResponseData instantiates a new CreateShipShipScan201ResponseData object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewCreateShipShipScan201ResponseDataWithDefaults
`func NewCreateShipShipScan201ResponseDataWithDefaults() *CreateShipShipScan201ResponseData`
NewCreateShipShipScan201ResponseDataWithDefaults instantiates a new CreateShipShipScan201ResponseData object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetCooldown
`func (o *CreateShipShipScan201ResponseData) GetCooldown() Cooldown`
GetCooldown returns the Cooldown field if non-nil, zero value otherwise.
### GetCooldownOk
`func (o *CreateShipShipScan201ResponseData) GetCooldownOk() (*Cooldown, bool)`
GetCooldownOk returns a tuple with the Cooldown field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCooldown
`func (o *CreateShipShipScan201ResponseData) SetCooldown(v Cooldown)`
SetCooldown sets Cooldown field to given value.
### GetShips
`func (o *CreateShipShipScan201ResponseData) GetShips() []ScannedShip`
GetShips returns the Ships field if non-nil, zero value otherwise.
### GetShipsOk
`func (o *CreateShipShipScan201ResponseData) GetShipsOk() (*[]ScannedShip, bool)`
GetShipsOk returns a tuple with the Ships field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetShips
`func (o *CreateShipShipScan201ResponseData) SetShips(v []ScannedShip)`
SetShips sets Ships field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# CreateShipSystemScan201Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**CreateShipSystemScan201ResponseData**](CreateShipSystemScan201ResponseData.md) | |
## Methods
### NewCreateShipSystemScan201Response
`func NewCreateShipSystemScan201Response(data CreateShipSystemScan201ResponseData, ) *CreateShipSystemScan201Response`
NewCreateShipSystemScan201Response instantiates a new CreateShipSystemScan201Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewCreateShipSystemScan201ResponseWithDefaults
`func NewCreateShipSystemScan201ResponseWithDefaults() *CreateShipSystemScan201Response`
NewCreateShipSystemScan201ResponseWithDefaults instantiates a new CreateShipSystemScan201Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *CreateShipSystemScan201Response) GetData() CreateShipSystemScan201ResponseData`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *CreateShipSystemScan201Response) GetDataOk() (*CreateShipSystemScan201ResponseData, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *CreateShipSystemScan201Response) SetData(v CreateShipSystemScan201ResponseData)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,72 @@
# CreateShipSystemScan201ResponseData
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Cooldown** | [**Cooldown**](Cooldown.md) | |
**Systems** | [**[]ScannedSystem**](ScannedSystem.md) | |
## Methods
### NewCreateShipSystemScan201ResponseData
`func NewCreateShipSystemScan201ResponseData(cooldown Cooldown, systems []ScannedSystem, ) *CreateShipSystemScan201ResponseData`
NewCreateShipSystemScan201ResponseData instantiates a new CreateShipSystemScan201ResponseData object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewCreateShipSystemScan201ResponseDataWithDefaults
`func NewCreateShipSystemScan201ResponseDataWithDefaults() *CreateShipSystemScan201ResponseData`
NewCreateShipSystemScan201ResponseDataWithDefaults instantiates a new CreateShipSystemScan201ResponseData object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetCooldown
`func (o *CreateShipSystemScan201ResponseData) GetCooldown() Cooldown`
GetCooldown returns the Cooldown field if non-nil, zero value otherwise.
### GetCooldownOk
`func (o *CreateShipSystemScan201ResponseData) GetCooldownOk() (*Cooldown, bool)`
GetCooldownOk returns a tuple with the Cooldown field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCooldown
`func (o *CreateShipSystemScan201ResponseData) SetCooldown(v Cooldown)`
SetCooldown sets Cooldown field to given value.
### GetSystems
`func (o *CreateShipSystemScan201ResponseData) GetSystems() []ScannedSystem`
GetSystems returns the Systems field if non-nil, zero value otherwise.
### GetSystemsOk
`func (o *CreateShipSystemScan201ResponseData) GetSystemsOk() (*[]ScannedSystem, bool)`
GetSystemsOk returns a tuple with the Systems field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSystems
`func (o *CreateShipSystemScan201ResponseData) SetSystems(v []ScannedSystem)`
SetSystems sets Systems field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# CreateShipWaypointScan201Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**CreateShipWaypointScan201ResponseData**](CreateShipWaypointScan201ResponseData.md) | |
## Methods
### NewCreateShipWaypointScan201Response
`func NewCreateShipWaypointScan201Response(data CreateShipWaypointScan201ResponseData, ) *CreateShipWaypointScan201Response`
NewCreateShipWaypointScan201Response instantiates a new CreateShipWaypointScan201Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewCreateShipWaypointScan201ResponseWithDefaults
`func NewCreateShipWaypointScan201ResponseWithDefaults() *CreateShipWaypointScan201Response`
NewCreateShipWaypointScan201ResponseWithDefaults instantiates a new CreateShipWaypointScan201Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *CreateShipWaypointScan201Response) GetData() CreateShipWaypointScan201ResponseData`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *CreateShipWaypointScan201Response) GetDataOk() (*CreateShipWaypointScan201ResponseData, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *CreateShipWaypointScan201Response) SetData(v CreateShipWaypointScan201ResponseData)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,72 @@
# CreateShipWaypointScan201ResponseData
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Cooldown** | [**Cooldown**](Cooldown.md) | |
**Waypoints** | [**[]ScannedWaypoint**](ScannedWaypoint.md) | |
## Methods
### NewCreateShipWaypointScan201ResponseData
`func NewCreateShipWaypointScan201ResponseData(cooldown Cooldown, waypoints []ScannedWaypoint, ) *CreateShipWaypointScan201ResponseData`
NewCreateShipWaypointScan201ResponseData instantiates a new CreateShipWaypointScan201ResponseData object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewCreateShipWaypointScan201ResponseDataWithDefaults
`func NewCreateShipWaypointScan201ResponseDataWithDefaults() *CreateShipWaypointScan201ResponseData`
NewCreateShipWaypointScan201ResponseDataWithDefaults instantiates a new CreateShipWaypointScan201ResponseData object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetCooldown
`func (o *CreateShipWaypointScan201ResponseData) GetCooldown() Cooldown`
GetCooldown returns the Cooldown field if non-nil, zero value otherwise.
### GetCooldownOk
`func (o *CreateShipWaypointScan201ResponseData) GetCooldownOk() (*Cooldown, bool)`
GetCooldownOk returns a tuple with the Cooldown field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCooldown
`func (o *CreateShipWaypointScan201ResponseData) SetCooldown(v Cooldown)`
SetCooldown sets Cooldown field to given value.
### GetWaypoints
`func (o *CreateShipWaypointScan201ResponseData) GetWaypoints() []ScannedWaypoint`
GetWaypoints returns the Waypoints field if non-nil, zero value otherwise.
### GetWaypointsOk
`func (o *CreateShipWaypointScan201ResponseData) GetWaypointsOk() (*[]ScannedWaypoint, bool)`
GetWaypointsOk returns a tuple with the Waypoints field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetWaypoints
`func (o *CreateShipWaypointScan201ResponseData) SetWaypoints(v []ScannedWaypoint)`
SetWaypoints sets Waypoints field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# CreateSurvey201Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**CreateSurvey201ResponseData**](CreateSurvey201ResponseData.md) | |
## Methods
### NewCreateSurvey201Response
`func NewCreateSurvey201Response(data CreateSurvey201ResponseData, ) *CreateSurvey201Response`
NewCreateSurvey201Response instantiates a new CreateSurvey201Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewCreateSurvey201ResponseWithDefaults
`func NewCreateSurvey201ResponseWithDefaults() *CreateSurvey201Response`
NewCreateSurvey201ResponseWithDefaults instantiates a new CreateSurvey201Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *CreateSurvey201Response) GetData() CreateSurvey201ResponseData`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *CreateSurvey201Response) GetDataOk() (*CreateSurvey201ResponseData, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *CreateSurvey201Response) SetData(v CreateSurvey201ResponseData)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,72 @@
# CreateSurvey201ResponseData
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Cooldown** | [**Cooldown**](Cooldown.md) | |
**Surveys** | [**[]Survey**](Survey.md) | |
## Methods
### NewCreateSurvey201ResponseData
`func NewCreateSurvey201ResponseData(cooldown Cooldown, surveys []Survey, ) *CreateSurvey201ResponseData`
NewCreateSurvey201ResponseData instantiates a new CreateSurvey201ResponseData object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewCreateSurvey201ResponseDataWithDefaults
`func NewCreateSurvey201ResponseDataWithDefaults() *CreateSurvey201ResponseData`
NewCreateSurvey201ResponseDataWithDefaults instantiates a new CreateSurvey201ResponseData object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetCooldown
`func (o *CreateSurvey201ResponseData) GetCooldown() Cooldown`
GetCooldown returns the Cooldown field if non-nil, zero value otherwise.
### GetCooldownOk
`func (o *CreateSurvey201ResponseData) GetCooldownOk() (*Cooldown, bool)`
GetCooldownOk returns a tuple with the Cooldown field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCooldown
`func (o *CreateSurvey201ResponseData) SetCooldown(v Cooldown)`
SetCooldown sets Cooldown field to given value.
### GetSurveys
`func (o *CreateSurvey201ResponseData) GetSurveys() []Survey`
GetSurveys returns the Surveys field if non-nil, zero value otherwise.
### GetSurveysOk
`func (o *CreateSurvey201ResponseData) GetSurveysOk() (*[]Survey, bool)`
GetSurveysOk returns a tuple with the Surveys field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSurveys
`func (o *CreateSurvey201ResponseData) SetSurveys(v []Survey)`
SetSurveys sets Surveys field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

75
docs/DefaultApi.md Normal file
View File

@ -0,0 +1,75 @@
# \DefaultApi
All URIs are relative to *https://api.spacetraders.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**Register**](DefaultApi.md#Register) | **Post** /register | Register New Agent
## Register
> Register201Response Register(ctx).RegisterRequest(registerRequest).Execute()
Register New Agent
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
registerRequest := *openapiclient.NewRegisterRequest("Faction_example", "BADGER") // RegisterRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DefaultApi.Register(context.Background()).RegisterRequest(registerRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.Register``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Register`: Register201Response
fmt.Fprintf(os.Stdout, "Response from `DefaultApi.Register`: %v\n", resp)
}
```
### Path Parameters
### Other Parameters
Other parameters are passed through a pointer to a apiRegisterRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**registerRequest** | [**RegisterRequest**](RegisterRequest.md) | |
### Return type
[**Register201Response**](Register201Response.md)
### Authorization
[AgentToken](../README.md#AgentToken)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# DeliverContract200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**DeliverContract200ResponseData**](DeliverContract200ResponseData.md) | |
## Methods
### NewDeliverContract200Response
`func NewDeliverContract200Response(data DeliverContract200ResponseData, ) *DeliverContract200Response`
NewDeliverContract200Response instantiates a new DeliverContract200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewDeliverContract200ResponseWithDefaults
`func NewDeliverContract200ResponseWithDefaults() *DeliverContract200Response`
NewDeliverContract200ResponseWithDefaults instantiates a new DeliverContract200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *DeliverContract200Response) GetData() DeliverContract200ResponseData`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *DeliverContract200Response) GetDataOk() (*DeliverContract200ResponseData, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *DeliverContract200Response) SetData(v DeliverContract200ResponseData)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,72 @@
# DeliverContract200ResponseData
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Contract** | [**Contract**](Contract.md) | |
**Cargo** | [**ShipCargo**](ShipCargo.md) | |
## Methods
### NewDeliverContract200ResponseData
`func NewDeliverContract200ResponseData(contract Contract, cargo ShipCargo, ) *DeliverContract200ResponseData`
NewDeliverContract200ResponseData instantiates a new DeliverContract200ResponseData object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewDeliverContract200ResponseDataWithDefaults
`func NewDeliverContract200ResponseDataWithDefaults() *DeliverContract200ResponseData`
NewDeliverContract200ResponseDataWithDefaults instantiates a new DeliverContract200ResponseData object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetContract
`func (o *DeliverContract200ResponseData) GetContract() Contract`
GetContract returns the Contract field if non-nil, zero value otherwise.
### GetContractOk
`func (o *DeliverContract200ResponseData) GetContractOk() (*Contract, bool)`
GetContractOk returns a tuple with the Contract field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetContract
`func (o *DeliverContract200ResponseData) SetContract(v Contract)`
SetContract sets Contract field to given value.
### GetCargo
`func (o *DeliverContract200ResponseData) GetCargo() ShipCargo`
GetCargo returns the Cargo field if non-nil, zero value otherwise.
### GetCargoOk
`func (o *DeliverContract200ResponseData) GetCargoOk() (*ShipCargo, bool)`
GetCargoOk returns a tuple with the Cargo field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCargo
`func (o *DeliverContract200ResponseData) SetCargo(v ShipCargo)`
SetCargo sets Cargo field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,93 @@
# DeliverContractRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ShipSymbol** | **string** | |
**TradeSymbol** | **string** | |
**Units** | **int32** | |
## Methods
### NewDeliverContractRequest
`func NewDeliverContractRequest(shipSymbol string, tradeSymbol string, units int32, ) *DeliverContractRequest`
NewDeliverContractRequest instantiates a new DeliverContractRequest object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewDeliverContractRequestWithDefaults
`func NewDeliverContractRequestWithDefaults() *DeliverContractRequest`
NewDeliverContractRequestWithDefaults instantiates a new DeliverContractRequest object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetShipSymbol
`func (o *DeliverContractRequest) GetShipSymbol() string`
GetShipSymbol returns the ShipSymbol field if non-nil, zero value otherwise.
### GetShipSymbolOk
`func (o *DeliverContractRequest) GetShipSymbolOk() (*string, bool)`
GetShipSymbolOk returns a tuple with the ShipSymbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetShipSymbol
`func (o *DeliverContractRequest) SetShipSymbol(v string)`
SetShipSymbol sets ShipSymbol field to given value.
### GetTradeSymbol
`func (o *DeliverContractRequest) GetTradeSymbol() string`
GetTradeSymbol returns the TradeSymbol field if non-nil, zero value otherwise.
### GetTradeSymbolOk
`func (o *DeliverContractRequest) GetTradeSymbolOk() (*string, bool)`
GetTradeSymbolOk returns a tuple with the TradeSymbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetTradeSymbol
`func (o *DeliverContractRequest) SetTradeSymbol(v string)`
SetTradeSymbol sets TradeSymbol field to given value.
### GetUnits
`func (o *DeliverContractRequest) GetUnits() int32`
GetUnits returns the Units field if non-nil, zero value otherwise.
### GetUnitsOk
`func (o *DeliverContractRequest) GetUnitsOk() (*int32, bool)`
GetUnitsOk returns a tuple with the Units field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetUnits
`func (o *DeliverContractRequest) SetUnits(v int32)`
SetUnits sets Units field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# DockShip200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**OrbitShip200ResponseData**](OrbitShip200ResponseData.md) | |
## Methods
### NewDockShip200Response
`func NewDockShip200Response(data OrbitShip200ResponseData, ) *DockShip200Response`
NewDockShip200Response instantiates a new DockShip200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewDockShip200ResponseWithDefaults
`func NewDockShip200ResponseWithDefaults() *DockShip200Response`
NewDockShip200ResponseWithDefaults instantiates a new DockShip200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *DockShip200Response) GetData() OrbitShip200ResponseData`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *DockShip200Response) GetDataOk() (*OrbitShip200ResponseData, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *DockShip200Response) SetData(v OrbitShip200ResponseData)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# ExtractResources201Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**ExtractResources201ResponseData**](ExtractResources201ResponseData.md) | |
## Methods
### NewExtractResources201Response
`func NewExtractResources201Response(data ExtractResources201ResponseData, ) *ExtractResources201Response`
NewExtractResources201Response instantiates a new ExtractResources201Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewExtractResources201ResponseWithDefaults
`func NewExtractResources201ResponseWithDefaults() *ExtractResources201Response`
NewExtractResources201ResponseWithDefaults instantiates a new ExtractResources201Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *ExtractResources201Response) GetData() ExtractResources201ResponseData`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *ExtractResources201Response) GetDataOk() (*ExtractResources201ResponseData, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *ExtractResources201Response) SetData(v ExtractResources201ResponseData)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,93 @@
# ExtractResources201ResponseData
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Cooldown** | [**Cooldown**](Cooldown.md) | |
**Extraction** | [**Extraction**](Extraction.md) | |
**Cargo** | [**ShipCargo**](ShipCargo.md) | |
## Methods
### NewExtractResources201ResponseData
`func NewExtractResources201ResponseData(cooldown Cooldown, extraction Extraction, cargo ShipCargo, ) *ExtractResources201ResponseData`
NewExtractResources201ResponseData instantiates a new ExtractResources201ResponseData object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewExtractResources201ResponseDataWithDefaults
`func NewExtractResources201ResponseDataWithDefaults() *ExtractResources201ResponseData`
NewExtractResources201ResponseDataWithDefaults instantiates a new ExtractResources201ResponseData object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetCooldown
`func (o *ExtractResources201ResponseData) GetCooldown() Cooldown`
GetCooldown returns the Cooldown field if non-nil, zero value otherwise.
### GetCooldownOk
`func (o *ExtractResources201ResponseData) GetCooldownOk() (*Cooldown, bool)`
GetCooldownOk returns a tuple with the Cooldown field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCooldown
`func (o *ExtractResources201ResponseData) SetCooldown(v Cooldown)`
SetCooldown sets Cooldown field to given value.
### GetExtraction
`func (o *ExtractResources201ResponseData) GetExtraction() Extraction`
GetExtraction returns the Extraction field if non-nil, zero value otherwise.
### GetExtractionOk
`func (o *ExtractResources201ResponseData) GetExtractionOk() (*Extraction, bool)`
GetExtractionOk returns a tuple with the Extraction field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetExtraction
`func (o *ExtractResources201ResponseData) SetExtraction(v Extraction)`
SetExtraction sets Extraction field to given value.
### GetCargo
`func (o *ExtractResources201ResponseData) GetCargo() ShipCargo`
GetCargo returns the Cargo field if non-nil, zero value otherwise.
### GetCargoOk
`func (o *ExtractResources201ResponseData) GetCargoOk() (*ShipCargo, bool)`
GetCargoOk returns a tuple with the Cargo field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCargo
`func (o *ExtractResources201ResponseData) SetCargo(v ShipCargo)`
SetCargo sets Cargo field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,56 @@
# ExtractResourcesRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Survey** | Pointer to [**Survey**](Survey.md) | | [optional]
## Methods
### NewExtractResourcesRequest
`func NewExtractResourcesRequest() *ExtractResourcesRequest`
NewExtractResourcesRequest instantiates a new ExtractResourcesRequest object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewExtractResourcesRequestWithDefaults
`func NewExtractResourcesRequestWithDefaults() *ExtractResourcesRequest`
NewExtractResourcesRequestWithDefaults instantiates a new ExtractResourcesRequest object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetSurvey
`func (o *ExtractResourcesRequest) GetSurvey() Survey`
GetSurvey returns the Survey field if non-nil, zero value otherwise.
### GetSurveyOk
`func (o *ExtractResourcesRequest) GetSurveyOk() (*Survey, bool)`
GetSurveyOk returns a tuple with the Survey field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSurvey
`func (o *ExtractResourcesRequest) SetSurvey(v Survey)`
SetSurvey sets Survey field to given value.
### HasSurvey
`func (o *ExtractResourcesRequest) HasSurvey() bool`
HasSurvey returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

72
docs/Extraction.md Normal file
View File

@ -0,0 +1,72 @@
# Extraction
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ShipSymbol** | **string** | |
**Yield** | [**ExtractionYield**](ExtractionYield.md) | |
## Methods
### NewExtraction
`func NewExtraction(shipSymbol string, yield ExtractionYield, ) *Extraction`
NewExtraction instantiates a new Extraction object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewExtractionWithDefaults
`func NewExtractionWithDefaults() *Extraction`
NewExtractionWithDefaults instantiates a new Extraction object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetShipSymbol
`func (o *Extraction) GetShipSymbol() string`
GetShipSymbol returns the ShipSymbol field if non-nil, zero value otherwise.
### GetShipSymbolOk
`func (o *Extraction) GetShipSymbolOk() (*string, bool)`
GetShipSymbolOk returns a tuple with the ShipSymbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetShipSymbol
`func (o *Extraction) SetShipSymbol(v string)`
SetShipSymbol sets ShipSymbol field to given value.
### GetYield
`func (o *Extraction) GetYield() ExtractionYield`
GetYield returns the Yield field if non-nil, zero value otherwise.
### GetYieldOk
`func (o *Extraction) GetYieldOk() (*ExtractionYield, bool)`
GetYieldOk returns a tuple with the Yield field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetYield
`func (o *Extraction) SetYield(v ExtractionYield)`
SetYield sets Yield field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

72
docs/ExtractionYield.md Normal file
View File

@ -0,0 +1,72 @@
# ExtractionYield
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Symbol** | **string** | |
**Units** | **int32** | The number of units extracted that were placed into the ship&#39;s cargo hold. |
## Methods
### NewExtractionYield
`func NewExtractionYield(symbol string, units int32, ) *ExtractionYield`
NewExtractionYield instantiates a new ExtractionYield object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewExtractionYieldWithDefaults
`func NewExtractionYieldWithDefaults() *ExtractionYield`
NewExtractionYieldWithDefaults instantiates a new ExtractionYield object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetSymbol
`func (o *ExtractionYield) GetSymbol() string`
GetSymbol returns the Symbol field if non-nil, zero value otherwise.
### GetSymbolOk
`func (o *ExtractionYield) GetSymbolOk() (*string, bool)`
GetSymbolOk returns a tuple with the Symbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSymbol
`func (o *ExtractionYield) SetSymbol(v string)`
SetSymbol sets Symbol field to given value.
### GetUnits
`func (o *ExtractionYield) GetUnits() int32`
GetUnits returns the Units field if non-nil, zero value otherwise.
### GetUnitsOk
`func (o *ExtractionYield) GetUnitsOk() (*int32, bool)`
GetUnitsOk returns a tuple with the Units field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetUnits
`func (o *ExtractionYield) SetUnits(v int32)`
SetUnits sets Units field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

135
docs/Faction.md Normal file
View File

@ -0,0 +1,135 @@
# Faction
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Symbol** | **string** | |
**Name** | **string** | |
**Description** | **string** | |
**Headquarters** | **string** | |
**Traits** | [**[]FactionTrait**](FactionTrait.md) | |
## Methods
### NewFaction
`func NewFaction(symbol string, name string, description string, headquarters string, traits []FactionTrait, ) *Faction`
NewFaction instantiates a new Faction object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewFactionWithDefaults
`func NewFactionWithDefaults() *Faction`
NewFactionWithDefaults instantiates a new Faction object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetSymbol
`func (o *Faction) GetSymbol() string`
GetSymbol returns the Symbol field if non-nil, zero value otherwise.
### GetSymbolOk
`func (o *Faction) GetSymbolOk() (*string, bool)`
GetSymbolOk returns a tuple with the Symbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSymbol
`func (o *Faction) SetSymbol(v string)`
SetSymbol sets Symbol field to given value.
### GetName
`func (o *Faction) GetName() string`
GetName returns the Name field if non-nil, zero value otherwise.
### GetNameOk
`func (o *Faction) GetNameOk() (*string, bool)`
GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetName
`func (o *Faction) SetName(v string)`
SetName sets Name field to given value.
### GetDescription
`func (o *Faction) GetDescription() string`
GetDescription returns the Description field if non-nil, zero value otherwise.
### GetDescriptionOk
`func (o *Faction) GetDescriptionOk() (*string, bool)`
GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDescription
`func (o *Faction) SetDescription(v string)`
SetDescription sets Description field to given value.
### GetHeadquarters
`func (o *Faction) GetHeadquarters() string`
GetHeadquarters returns the Headquarters field if non-nil, zero value otherwise.
### GetHeadquartersOk
`func (o *Faction) GetHeadquartersOk() (*string, bool)`
GetHeadquartersOk returns a tuple with the Headquarters field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetHeadquarters
`func (o *Faction) SetHeadquarters(v string)`
SetHeadquarters sets Headquarters field to given value.
### GetTraits
`func (o *Faction) GetTraits() []FactionTrait`
GetTraits returns the Traits field if non-nil, zero value otherwise.
### GetTraitsOk
`func (o *Faction) GetTraitsOk() (*[]FactionTrait, bool)`
GetTraitsOk returns a tuple with the Traits field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetTraits
`func (o *Faction) SetTraits(v []FactionTrait)`
SetTraits sets Traits field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

93
docs/FactionTrait.md Normal file
View File

@ -0,0 +1,93 @@
# FactionTrait
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Symbol** | **string** | The unique identifier of the trait. |
**Name** | **string** | The name of the trait. |
**Description** | **string** | A description of the trait. |
## Methods
### NewFactionTrait
`func NewFactionTrait(symbol string, name string, description string, ) *FactionTrait`
NewFactionTrait instantiates a new FactionTrait object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewFactionTraitWithDefaults
`func NewFactionTraitWithDefaults() *FactionTrait`
NewFactionTraitWithDefaults instantiates a new FactionTrait object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetSymbol
`func (o *FactionTrait) GetSymbol() string`
GetSymbol returns the Symbol field if non-nil, zero value otherwise.
### GetSymbolOk
`func (o *FactionTrait) GetSymbolOk() (*string, bool)`
GetSymbolOk returns a tuple with the Symbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSymbol
`func (o *FactionTrait) SetSymbol(v string)`
SetSymbol sets Symbol field to given value.
### GetName
`func (o *FactionTrait) GetName() string`
GetName returns the Name field if non-nil, zero value otherwise.
### GetNameOk
`func (o *FactionTrait) GetNameOk() (*string, bool)`
GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetName
`func (o *FactionTrait) SetName(v string)`
SetName sets Name field to given value.
### GetDescription
`func (o *FactionTrait) GetDescription() string`
GetDescription returns the Description field if non-nil, zero value otherwise.
### GetDescriptionOk
`func (o *FactionTrait) GetDescriptionOk() (*string, bool)`
GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetDescription
`func (o *FactionTrait) SetDescription(v string)`
SetDescription sets Description field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

148
docs/FactionsApi.md Normal file
View File

@ -0,0 +1,148 @@
# \FactionsApi
All URIs are relative to *https://api.spacetraders.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**GetFaction**](FactionsApi.md#GetFaction) | **Get** /factions/{factionSymbol} | Get Faction
[**GetFactions**](FactionsApi.md#GetFactions) | **Get** /factions | List Factions
## GetFaction
> GetFaction200Response GetFaction(ctx, factionSymbol).Execute()
Get Faction
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
factionSymbol := "factionSymbol_example" // string | The faction symbol (default to "CGR")
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FactionsApi.GetFaction(context.Background(), factionSymbol).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FactionsApi.GetFaction``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetFaction`: GetFaction200Response
fmt.Fprintf(os.Stdout, "Response from `FactionsApi.GetFaction`: %v\n", resp)
}
```
### Path Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.
**factionSymbol** | **string** | The faction symbol | [default to &quot;CGR&quot;]
### Other Parameters
Other parameters are passed through a pointer to a apiGetFactionRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
### Return type
[**GetFaction200Response**](GetFaction200Response.md)
### Authorization
[AgentToken](../README.md#AgentToken)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)
## GetFactions
> GetFactions200Response GetFactions(ctx).Page(page).Limit(limit).Execute()
List Factions
### Example
```go
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
page := int32(56) // int32 | What entry offset to request (optional)
limit := int32(56) // int32 | How many entries to return per page (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FactionsApi.GetFactions(context.Background()).Page(page).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FactionsApi.GetFactions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetFactions`: GetFactions200Response
fmt.Fprintf(os.Stdout, "Response from `FactionsApi.GetFactions`: %v\n", resp)
}
```
### Path Parameters
### Other Parameters
Other parameters are passed through a pointer to a apiGetFactionsRequest struct via the builder pattern
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**page** | **int32** | What entry offset to request |
**limit** | **int32** | How many entries to return per page |
### Return type
[**GetFactions200Response**](GetFactions200Response.md)
### Authorization
[AgentToken](../README.md#AgentToken)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)

1726
docs/FleetApi.md Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,51 @@
# FulfillContract200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**AcceptContract200ResponseData**](AcceptContract200ResponseData.md) | |
## Methods
### NewFulfillContract200Response
`func NewFulfillContract200Response(data AcceptContract200ResponseData, ) *FulfillContract200Response`
NewFulfillContract200Response instantiates a new FulfillContract200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewFulfillContract200ResponseWithDefaults
`func NewFulfillContract200ResponseWithDefaults() *FulfillContract200Response`
NewFulfillContract200ResponseWithDefaults instantiates a new FulfillContract200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *FulfillContract200Response) GetData() AcceptContract200ResponseData`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *FulfillContract200Response) GetDataOk() (*AcceptContract200ResponseData, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *FulfillContract200Response) SetData(v AcceptContract200ResponseData)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# GetContract200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**Contract**](Contract.md) | |
## Methods
### NewGetContract200Response
`func NewGetContract200Response(data Contract, ) *GetContract200Response`
NewGetContract200Response instantiates a new GetContract200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewGetContract200ResponseWithDefaults
`func NewGetContract200ResponseWithDefaults() *GetContract200Response`
NewGetContract200ResponseWithDefaults instantiates a new GetContract200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *GetContract200Response) GetData() Contract`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *GetContract200Response) GetDataOk() (*Contract, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *GetContract200Response) SetData(v Contract)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,72 @@
# GetContracts200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**[]Contract**](Contract.md) | |
**Meta** | [**Meta**](Meta.md) | |
## Methods
### NewGetContracts200Response
`func NewGetContracts200Response(data []Contract, meta Meta, ) *GetContracts200Response`
NewGetContracts200Response instantiates a new GetContracts200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewGetContracts200ResponseWithDefaults
`func NewGetContracts200ResponseWithDefaults() *GetContracts200Response`
NewGetContracts200ResponseWithDefaults instantiates a new GetContracts200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *GetContracts200Response) GetData() []Contract`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *GetContracts200Response) GetDataOk() (*[]Contract, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *GetContracts200Response) SetData(v []Contract)`
SetData sets Data field to given value.
### GetMeta
`func (o *GetContracts200Response) GetMeta() Meta`
GetMeta returns the Meta field if non-nil, zero value otherwise.
### GetMetaOk
`func (o *GetContracts200Response) GetMetaOk() (*Meta, bool)`
GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetMeta
`func (o *GetContracts200Response) SetMeta(v Meta)`
SetMeta sets Meta field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# GetFaction200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**Faction**](Faction.md) | |
## Methods
### NewGetFaction200Response
`func NewGetFaction200Response(data Faction, ) *GetFaction200Response`
NewGetFaction200Response instantiates a new GetFaction200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewGetFaction200ResponseWithDefaults
`func NewGetFaction200ResponseWithDefaults() *GetFaction200Response`
NewGetFaction200ResponseWithDefaults instantiates a new GetFaction200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *GetFaction200Response) GetData() Faction`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *GetFaction200Response) GetDataOk() (*Faction, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *GetFaction200Response) SetData(v Faction)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,72 @@
# GetFactions200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**[]Faction**](Faction.md) | |
**Meta** | [**Meta**](Meta.md) | |
## Methods
### NewGetFactions200Response
`func NewGetFactions200Response(data []Faction, meta Meta, ) *GetFactions200Response`
NewGetFactions200Response instantiates a new GetFactions200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewGetFactions200ResponseWithDefaults
`func NewGetFactions200ResponseWithDefaults() *GetFactions200Response`
NewGetFactions200ResponseWithDefaults instantiates a new GetFactions200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *GetFactions200Response) GetData() []Faction`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *GetFactions200Response) GetDataOk() (*[]Faction, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *GetFactions200Response) SetData(v []Faction)`
SetData sets Data field to given value.
### GetMeta
`func (o *GetFactions200Response) GetMeta() Meta`
GetMeta returns the Meta field if non-nil, zero value otherwise.
### GetMetaOk
`func (o *GetFactions200Response) GetMetaOk() (*Meta, bool)`
GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetMeta
`func (o *GetFactions200Response) SetMeta(v Meta)`
SetMeta sets Meta field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# GetJumpGate200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**JumpGate**](JumpGate.md) | |
## Methods
### NewGetJumpGate200Response
`func NewGetJumpGate200Response(data JumpGate, ) *GetJumpGate200Response`
NewGetJumpGate200Response instantiates a new GetJumpGate200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewGetJumpGate200ResponseWithDefaults
`func NewGetJumpGate200ResponseWithDefaults() *GetJumpGate200Response`
NewGetJumpGate200ResponseWithDefaults instantiates a new GetJumpGate200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *GetJumpGate200Response) GetData() JumpGate`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *GetJumpGate200Response) GetDataOk() (*JumpGate, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *GetJumpGate200Response) SetData(v JumpGate)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# GetMarket200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**Market**](Market.md) | |
## Methods
### NewGetMarket200Response
`func NewGetMarket200Response(data Market, ) *GetMarket200Response`
NewGetMarket200Response instantiates a new GetMarket200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewGetMarket200ResponseWithDefaults
`func NewGetMarket200ResponseWithDefaults() *GetMarket200Response`
NewGetMarket200ResponseWithDefaults instantiates a new GetMarket200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *GetMarket200Response) GetData() Market`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *GetMarket200Response) GetDataOk() (*Market, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *GetMarket200Response) SetData(v Market)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# GetMyAgent200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**Agent**](Agent.md) | |
## Methods
### NewGetMyAgent200Response
`func NewGetMyAgent200Response(data Agent, ) *GetMyAgent200Response`
NewGetMyAgent200Response instantiates a new GetMyAgent200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewGetMyAgent200ResponseWithDefaults
`func NewGetMyAgent200ResponseWithDefaults() *GetMyAgent200Response`
NewGetMyAgent200ResponseWithDefaults instantiates a new GetMyAgent200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *GetMyAgent200Response) GetData() Agent`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *GetMyAgent200Response) GetDataOk() (*Agent, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *GetMyAgent200Response) SetData(v Agent)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# GetMyShip200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**Ship**](Ship.md) | |
## Methods
### NewGetMyShip200Response
`func NewGetMyShip200Response(data Ship, ) *GetMyShip200Response`
NewGetMyShip200Response instantiates a new GetMyShip200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewGetMyShip200ResponseWithDefaults
`func NewGetMyShip200ResponseWithDefaults() *GetMyShip200Response`
NewGetMyShip200ResponseWithDefaults instantiates a new GetMyShip200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *GetMyShip200Response) GetData() Ship`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *GetMyShip200Response) GetDataOk() (*Ship, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *GetMyShip200Response) SetData(v Ship)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# GetMyShipCargo200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**ShipCargo**](ShipCargo.md) | |
## Methods
### NewGetMyShipCargo200Response
`func NewGetMyShipCargo200Response(data ShipCargo, ) *GetMyShipCargo200Response`
NewGetMyShipCargo200Response instantiates a new GetMyShipCargo200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewGetMyShipCargo200ResponseWithDefaults
`func NewGetMyShipCargo200ResponseWithDefaults() *GetMyShipCargo200Response`
NewGetMyShipCargo200ResponseWithDefaults instantiates a new GetMyShipCargo200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *GetMyShipCargo200Response) GetData() ShipCargo`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *GetMyShipCargo200Response) GetDataOk() (*ShipCargo, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *GetMyShipCargo200Response) SetData(v ShipCargo)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,72 @@
# GetMyShips200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**[]Ship**](Ship.md) | |
**Meta** | [**Meta**](Meta.md) | |
## Methods
### NewGetMyShips200Response
`func NewGetMyShips200Response(data []Ship, meta Meta, ) *GetMyShips200Response`
NewGetMyShips200Response instantiates a new GetMyShips200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewGetMyShips200ResponseWithDefaults
`func NewGetMyShips200ResponseWithDefaults() *GetMyShips200Response`
NewGetMyShips200ResponseWithDefaults instantiates a new GetMyShips200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *GetMyShips200Response) GetData() []Ship`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *GetMyShips200Response) GetDataOk() (*[]Ship, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *GetMyShips200Response) SetData(v []Ship)`
SetData sets Data field to given value.
### GetMeta
`func (o *GetMyShips200Response) GetMeta() Meta`
GetMeta returns the Meta field if non-nil, zero value otherwise.
### GetMetaOk
`func (o *GetMyShips200Response) GetMetaOk() (*Meta, bool)`
GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetMeta
`func (o *GetMyShips200Response) SetMeta(v Meta)`
SetMeta sets Meta field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# GetShipCooldown200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**Cooldown**](Cooldown.md) | |
## Methods
### NewGetShipCooldown200Response
`func NewGetShipCooldown200Response(data Cooldown, ) *GetShipCooldown200Response`
NewGetShipCooldown200Response instantiates a new GetShipCooldown200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewGetShipCooldown200ResponseWithDefaults
`func NewGetShipCooldown200ResponseWithDefaults() *GetShipCooldown200Response`
NewGetShipCooldown200ResponseWithDefaults instantiates a new GetShipCooldown200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *GetShipCooldown200Response) GetData() Cooldown`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *GetShipCooldown200Response) GetDataOk() (*Cooldown, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *GetShipCooldown200Response) SetData(v Cooldown)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# GetShipNav200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**ShipNav**](ShipNav.md) | |
## Methods
### NewGetShipNav200Response
`func NewGetShipNav200Response(data ShipNav, ) *GetShipNav200Response`
NewGetShipNav200Response instantiates a new GetShipNav200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewGetShipNav200ResponseWithDefaults
`func NewGetShipNav200ResponseWithDefaults() *GetShipNav200Response`
NewGetShipNav200ResponseWithDefaults instantiates a new GetShipNav200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *GetShipNav200Response) GetData() ShipNav`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *GetShipNav200Response) GetDataOk() (*ShipNav, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *GetShipNav200Response) SetData(v ShipNav)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# GetShipyard200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**Shipyard**](Shipyard.md) | |
## Methods
### NewGetShipyard200Response
`func NewGetShipyard200Response(data Shipyard, ) *GetShipyard200Response`
NewGetShipyard200Response instantiates a new GetShipyard200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewGetShipyard200ResponseWithDefaults
`func NewGetShipyard200ResponseWithDefaults() *GetShipyard200Response`
NewGetShipyard200ResponseWithDefaults instantiates a new GetShipyard200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *GetShipyard200Response) GetData() Shipyard`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *GetShipyard200Response) GetDataOk() (*Shipyard, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *GetShipyard200Response) SetData(v Shipyard)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# GetSystem200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**System**](System.md) | |
## Methods
### NewGetSystem200Response
`func NewGetSystem200Response(data System, ) *GetSystem200Response`
NewGetSystem200Response instantiates a new GetSystem200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewGetSystem200ResponseWithDefaults
`func NewGetSystem200ResponseWithDefaults() *GetSystem200Response`
NewGetSystem200ResponseWithDefaults instantiates a new GetSystem200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *GetSystem200Response) GetData() System`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *GetSystem200Response) GetDataOk() (*System, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *GetSystem200Response) SetData(v System)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,72 @@
# GetSystemWaypoints200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**[]Waypoint**](Waypoint.md) | |
**Meta** | [**Meta**](Meta.md) | |
## Methods
### NewGetSystemWaypoints200Response
`func NewGetSystemWaypoints200Response(data []Waypoint, meta Meta, ) *GetSystemWaypoints200Response`
NewGetSystemWaypoints200Response instantiates a new GetSystemWaypoints200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewGetSystemWaypoints200ResponseWithDefaults
`func NewGetSystemWaypoints200ResponseWithDefaults() *GetSystemWaypoints200Response`
NewGetSystemWaypoints200ResponseWithDefaults instantiates a new GetSystemWaypoints200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *GetSystemWaypoints200Response) GetData() []Waypoint`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *GetSystemWaypoints200Response) GetDataOk() (*[]Waypoint, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *GetSystemWaypoints200Response) SetData(v []Waypoint)`
SetData sets Data field to given value.
### GetMeta
`func (o *GetSystemWaypoints200Response) GetMeta() Meta`
GetMeta returns the Meta field if non-nil, zero value otherwise.
### GetMetaOk
`func (o *GetSystemWaypoints200Response) GetMetaOk() (*Meta, bool)`
GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetMeta
`func (o *GetSystemWaypoints200Response) SetMeta(v Meta)`
SetMeta sets Meta field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,72 @@
# GetSystems200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**[]System**](System.md) | |
**Meta** | [**Meta**](Meta.md) | |
## Methods
### NewGetSystems200Response
`func NewGetSystems200Response(data []System, meta Meta, ) *GetSystems200Response`
NewGetSystems200Response instantiates a new GetSystems200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewGetSystems200ResponseWithDefaults
`func NewGetSystems200ResponseWithDefaults() *GetSystems200Response`
NewGetSystems200ResponseWithDefaults instantiates a new GetSystems200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *GetSystems200Response) GetData() []System`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *GetSystems200Response) GetDataOk() (*[]System, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *GetSystems200Response) SetData(v []System)`
SetData sets Data field to given value.
### GetMeta
`func (o *GetSystems200Response) GetMeta() Meta`
GetMeta returns the Meta field if non-nil, zero value otherwise.
### GetMetaOk
`func (o *GetSystems200Response) GetMetaOk() (*Meta, bool)`
GetMetaOk returns a tuple with the Meta field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetMeta
`func (o *GetSystems200Response) SetMeta(v Meta)`
SetMeta sets Meta field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# GetWaypoint200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**Waypoint**](Waypoint.md) | |
## Methods
### NewGetWaypoint200Response
`func NewGetWaypoint200Response(data Waypoint, ) *GetWaypoint200Response`
NewGetWaypoint200Response instantiates a new GetWaypoint200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewGetWaypoint200ResponseWithDefaults
`func NewGetWaypoint200ResponseWithDefaults() *GetWaypoint200Response`
NewGetWaypoint200ResponseWithDefaults instantiates a new GetWaypoint200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *GetWaypoint200Response) GetData() Waypoint`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *GetWaypoint200Response) GetDataOk() (*Waypoint, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *GetWaypoint200Response) SetData(v Waypoint)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# Jettison200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**Jettison200ResponseData**](Jettison200ResponseData.md) | |
## Methods
### NewJettison200Response
`func NewJettison200Response(data Jettison200ResponseData, ) *Jettison200Response`
NewJettison200Response instantiates a new Jettison200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewJettison200ResponseWithDefaults
`func NewJettison200ResponseWithDefaults() *Jettison200Response`
NewJettison200ResponseWithDefaults instantiates a new Jettison200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *Jettison200Response) GetData() Jettison200ResponseData`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *Jettison200Response) GetDataOk() (*Jettison200ResponseData, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *Jettison200Response) SetData(v Jettison200ResponseData)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# Jettison200ResponseData
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Cargo** | [**ShipCargo**](ShipCargo.md) | |
## Methods
### NewJettison200ResponseData
`func NewJettison200ResponseData(cargo ShipCargo, ) *Jettison200ResponseData`
NewJettison200ResponseData instantiates a new Jettison200ResponseData object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewJettison200ResponseDataWithDefaults
`func NewJettison200ResponseDataWithDefaults() *Jettison200ResponseData`
NewJettison200ResponseDataWithDefaults instantiates a new Jettison200ResponseData object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetCargo
`func (o *Jettison200ResponseData) GetCargo() ShipCargo`
GetCargo returns the Cargo field if non-nil, zero value otherwise.
### GetCargoOk
`func (o *Jettison200ResponseData) GetCargoOk() (*ShipCargo, bool)`
GetCargoOk returns a tuple with the Cargo field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCargo
`func (o *Jettison200ResponseData) SetCargo(v ShipCargo)`
SetCargo sets Cargo field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

72
docs/JettisonRequest.md Normal file
View File

@ -0,0 +1,72 @@
# JettisonRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Symbol** | **string** | |
**Units** | **int32** | |
## Methods
### NewJettisonRequest
`func NewJettisonRequest(symbol string, units int32, ) *JettisonRequest`
NewJettisonRequest instantiates a new JettisonRequest object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewJettisonRequestWithDefaults
`func NewJettisonRequestWithDefaults() *JettisonRequest`
NewJettisonRequestWithDefaults instantiates a new JettisonRequest object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetSymbol
`func (o *JettisonRequest) GetSymbol() string`
GetSymbol returns the Symbol field if non-nil, zero value otherwise.
### GetSymbolOk
`func (o *JettisonRequest) GetSymbolOk() (*string, bool)`
GetSymbolOk returns a tuple with the Symbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSymbol
`func (o *JettisonRequest) SetSymbol(v string)`
SetSymbol sets Symbol field to given value.
### GetUnits
`func (o *JettisonRequest) GetUnits() int32`
GetUnits returns the Units field if non-nil, zero value otherwise.
### GetUnitsOk
`func (o *JettisonRequest) GetUnitsOk() (*int32, bool)`
GetUnitsOk returns a tuple with the Units field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetUnits
`func (o *JettisonRequest) SetUnits(v int32)`
SetUnits sets Units field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

98
docs/JumpGate.md Normal file
View File

@ -0,0 +1,98 @@
# JumpGate
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**JumpRange** | **float32** | The maximum jump range of the gate. |
**FactionSymbol** | Pointer to **string** | The symbol of the faction that owns the gate. | [optional]
**ConnectedSystems** | [**[]ConnectedSystem**](ConnectedSystem.md) | The systems within range of the gate that have a corresponding gate. |
## Methods
### NewJumpGate
`func NewJumpGate(jumpRange float32, connectedSystems []ConnectedSystem, ) *JumpGate`
NewJumpGate instantiates a new JumpGate object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewJumpGateWithDefaults
`func NewJumpGateWithDefaults() *JumpGate`
NewJumpGateWithDefaults instantiates a new JumpGate object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetJumpRange
`func (o *JumpGate) GetJumpRange() float32`
GetJumpRange returns the JumpRange field if non-nil, zero value otherwise.
### GetJumpRangeOk
`func (o *JumpGate) GetJumpRangeOk() (*float32, bool)`
GetJumpRangeOk returns a tuple with the JumpRange field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetJumpRange
`func (o *JumpGate) SetJumpRange(v float32)`
SetJumpRange sets JumpRange field to given value.
### GetFactionSymbol
`func (o *JumpGate) GetFactionSymbol() string`
GetFactionSymbol returns the FactionSymbol field if non-nil, zero value otherwise.
### GetFactionSymbolOk
`func (o *JumpGate) GetFactionSymbolOk() (*string, bool)`
GetFactionSymbolOk returns a tuple with the FactionSymbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetFactionSymbol
`func (o *JumpGate) SetFactionSymbol(v string)`
SetFactionSymbol sets FactionSymbol field to given value.
### HasFactionSymbol
`func (o *JumpGate) HasFactionSymbol() bool`
HasFactionSymbol returns a boolean if a field has been set.
### GetConnectedSystems
`func (o *JumpGate) GetConnectedSystems() []ConnectedSystem`
GetConnectedSystems returns the ConnectedSystems field if non-nil, zero value otherwise.
### GetConnectedSystemsOk
`func (o *JumpGate) GetConnectedSystemsOk() (*[]ConnectedSystem, bool)`
GetConnectedSystemsOk returns a tuple with the ConnectedSystems field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetConnectedSystems
`func (o *JumpGate) SetConnectedSystems(v []ConnectedSystem)`
SetConnectedSystems sets ConnectedSystems field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# JumpShip200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**JumpShip200ResponseData**](JumpShip200ResponseData.md) | |
## Methods
### NewJumpShip200Response
`func NewJumpShip200Response(data JumpShip200ResponseData, ) *JumpShip200Response`
NewJumpShip200Response instantiates a new JumpShip200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewJumpShip200ResponseWithDefaults
`func NewJumpShip200ResponseWithDefaults() *JumpShip200Response`
NewJumpShip200ResponseWithDefaults instantiates a new JumpShip200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *JumpShip200Response) GetData() JumpShip200ResponseData`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *JumpShip200Response) GetDataOk() (*JumpShip200ResponseData, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *JumpShip200Response) SetData(v JumpShip200ResponseData)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,77 @@
# JumpShip200ResponseData
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Cooldown** | [**Cooldown**](Cooldown.md) | |
**Nav** | Pointer to [**ShipNav**](ShipNav.md) | | [optional]
## Methods
### NewJumpShip200ResponseData
`func NewJumpShip200ResponseData(cooldown Cooldown, ) *JumpShip200ResponseData`
NewJumpShip200ResponseData instantiates a new JumpShip200ResponseData object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewJumpShip200ResponseDataWithDefaults
`func NewJumpShip200ResponseDataWithDefaults() *JumpShip200ResponseData`
NewJumpShip200ResponseDataWithDefaults instantiates a new JumpShip200ResponseData object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetCooldown
`func (o *JumpShip200ResponseData) GetCooldown() Cooldown`
GetCooldown returns the Cooldown field if non-nil, zero value otherwise.
### GetCooldownOk
`func (o *JumpShip200ResponseData) GetCooldownOk() (*Cooldown, bool)`
GetCooldownOk returns a tuple with the Cooldown field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetCooldown
`func (o *JumpShip200ResponseData) SetCooldown(v Cooldown)`
SetCooldown sets Cooldown field to given value.
### GetNav
`func (o *JumpShip200ResponseData) GetNav() ShipNav`
GetNav returns the Nav field if non-nil, zero value otherwise.
### GetNavOk
`func (o *JumpShip200ResponseData) GetNavOk() (*ShipNav, bool)`
GetNavOk returns a tuple with the Nav field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetNav
`func (o *JumpShip200ResponseData) SetNav(v ShipNav)`
SetNav sets Nav field to given value.
### HasNav
`func (o *JumpShip200ResponseData) HasNav() bool`
HasNav returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

51
docs/JumpShipRequest.md Normal file
View File

@ -0,0 +1,51 @@
# JumpShipRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**SystemSymbol** | **string** | The system symbol to jump to. |
## Methods
### NewJumpShipRequest
`func NewJumpShipRequest(systemSymbol string, ) *JumpShipRequest`
NewJumpShipRequest instantiates a new JumpShipRequest object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewJumpShipRequestWithDefaults
`func NewJumpShipRequestWithDefaults() *JumpShipRequest`
NewJumpShipRequestWithDefaults instantiates a new JumpShipRequest object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetSystemSymbol
`func (o *JumpShipRequest) GetSystemSymbol() string`
GetSystemSymbol returns the SystemSymbol field if non-nil, zero value otherwise.
### GetSystemSymbolOk
`func (o *JumpShipRequest) GetSystemSymbolOk() (*string, bool)`
GetSystemSymbolOk returns a tuple with the SystemSymbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSystemSymbol
`func (o *JumpShipRequest) SetSystemSymbol(v string)`
SetSystemSymbol sets SystemSymbol field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

166
docs/Market.md Normal file
View File

@ -0,0 +1,166 @@
# Market
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Symbol** | **string** | The symbol of the market. The symbol is the same as the waypoint where the market is located. |
**Exports** | [**[]TradeGood**](TradeGood.md) | The list of goods that are exported from this market. |
**Imports** | [**[]TradeGood**](TradeGood.md) | The list of goods that are sought as imports in this market. |
**Exchange** | [**[]TradeGood**](TradeGood.md) | The list of goods that are bought and sold between agents at this market. |
**Transactions** | Pointer to [**[]MarketTransaction**](MarketTransaction.md) | The list of recent transactions at this market. Visible only when a ship is present at the market. | [optional]
**TradeGoods** | Pointer to [**[]MarketTradeGood**](MarketTradeGood.md) | The list of goods that are traded at this market. Visible only when a ship is present at the market. | [optional]
## Methods
### NewMarket
`func NewMarket(symbol string, exports []TradeGood, imports []TradeGood, exchange []TradeGood, ) *Market`
NewMarket instantiates a new Market object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewMarketWithDefaults
`func NewMarketWithDefaults() *Market`
NewMarketWithDefaults instantiates a new Market object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetSymbol
`func (o *Market) GetSymbol() string`
GetSymbol returns the Symbol field if non-nil, zero value otherwise.
### GetSymbolOk
`func (o *Market) GetSymbolOk() (*string, bool)`
GetSymbolOk returns a tuple with the Symbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSymbol
`func (o *Market) SetSymbol(v string)`
SetSymbol sets Symbol field to given value.
### GetExports
`func (o *Market) GetExports() []TradeGood`
GetExports returns the Exports field if non-nil, zero value otherwise.
### GetExportsOk
`func (o *Market) GetExportsOk() (*[]TradeGood, bool)`
GetExportsOk returns a tuple with the Exports field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetExports
`func (o *Market) SetExports(v []TradeGood)`
SetExports sets Exports field to given value.
### GetImports
`func (o *Market) GetImports() []TradeGood`
GetImports returns the Imports field if non-nil, zero value otherwise.
### GetImportsOk
`func (o *Market) GetImportsOk() (*[]TradeGood, bool)`
GetImportsOk returns a tuple with the Imports field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetImports
`func (o *Market) SetImports(v []TradeGood)`
SetImports sets Imports field to given value.
### GetExchange
`func (o *Market) GetExchange() []TradeGood`
GetExchange returns the Exchange field if non-nil, zero value otherwise.
### GetExchangeOk
`func (o *Market) GetExchangeOk() (*[]TradeGood, bool)`
GetExchangeOk returns a tuple with the Exchange field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetExchange
`func (o *Market) SetExchange(v []TradeGood)`
SetExchange sets Exchange field to given value.
### GetTransactions
`func (o *Market) GetTransactions() []MarketTransaction`
GetTransactions returns the Transactions field if non-nil, zero value otherwise.
### GetTransactionsOk
`func (o *Market) GetTransactionsOk() (*[]MarketTransaction, bool)`
GetTransactionsOk returns a tuple with the Transactions field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetTransactions
`func (o *Market) SetTransactions(v []MarketTransaction)`
SetTransactions sets Transactions field to given value.
### HasTransactions
`func (o *Market) HasTransactions() bool`
HasTransactions returns a boolean if a field has been set.
### GetTradeGoods
`func (o *Market) GetTradeGoods() []MarketTradeGood`
GetTradeGoods returns the TradeGoods field if non-nil, zero value otherwise.
### GetTradeGoodsOk
`func (o *Market) GetTradeGoodsOk() (*[]MarketTradeGood, bool)`
GetTradeGoodsOk returns a tuple with the TradeGoods field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetTradeGoods
`func (o *Market) SetTradeGoods(v []MarketTradeGood)`
SetTradeGoods sets TradeGoods field to given value.
### HasTradeGoods
`func (o *Market) HasTradeGoods() bool`
HasTradeGoods returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

135
docs/MarketTradeGood.md Normal file
View File

@ -0,0 +1,135 @@
# MarketTradeGood
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Symbol** | **string** | The symbol of the trade good. |
**TradeVolume** | **int32** | The typical volume flowing through the market for this type of good. The larger the trade volume, the more stable prices will be. |
**Supply** | **string** | A rough estimate of the total supply of this good in the marketplace. |
**PurchasePrice** | **int32** | The price at which this good can be purchased from the market. |
**SellPrice** | **int32** | The price at which this good can be sold to the market. |
## Methods
### NewMarketTradeGood
`func NewMarketTradeGood(symbol string, tradeVolume int32, supply string, purchasePrice int32, sellPrice int32, ) *MarketTradeGood`
NewMarketTradeGood instantiates a new MarketTradeGood object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewMarketTradeGoodWithDefaults
`func NewMarketTradeGoodWithDefaults() *MarketTradeGood`
NewMarketTradeGoodWithDefaults instantiates a new MarketTradeGood object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetSymbol
`func (o *MarketTradeGood) GetSymbol() string`
GetSymbol returns the Symbol field if non-nil, zero value otherwise.
### GetSymbolOk
`func (o *MarketTradeGood) GetSymbolOk() (*string, bool)`
GetSymbolOk returns a tuple with the Symbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSymbol
`func (o *MarketTradeGood) SetSymbol(v string)`
SetSymbol sets Symbol field to given value.
### GetTradeVolume
`func (o *MarketTradeGood) GetTradeVolume() int32`
GetTradeVolume returns the TradeVolume field if non-nil, zero value otherwise.
### GetTradeVolumeOk
`func (o *MarketTradeGood) GetTradeVolumeOk() (*int32, bool)`
GetTradeVolumeOk returns a tuple with the TradeVolume field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetTradeVolume
`func (o *MarketTradeGood) SetTradeVolume(v int32)`
SetTradeVolume sets TradeVolume field to given value.
### GetSupply
`func (o *MarketTradeGood) GetSupply() string`
GetSupply returns the Supply field if non-nil, zero value otherwise.
### GetSupplyOk
`func (o *MarketTradeGood) GetSupplyOk() (*string, bool)`
GetSupplyOk returns a tuple with the Supply field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSupply
`func (o *MarketTradeGood) SetSupply(v string)`
SetSupply sets Supply field to given value.
### GetPurchasePrice
`func (o *MarketTradeGood) GetPurchasePrice() int32`
GetPurchasePrice returns the PurchasePrice field if non-nil, zero value otherwise.
### GetPurchasePriceOk
`func (o *MarketTradeGood) GetPurchasePriceOk() (*int32, bool)`
GetPurchasePriceOk returns a tuple with the PurchasePrice field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetPurchasePrice
`func (o *MarketTradeGood) SetPurchasePrice(v int32)`
SetPurchasePrice sets PurchasePrice field to given value.
### GetSellPrice
`func (o *MarketTradeGood) GetSellPrice() int32`
GetSellPrice returns the SellPrice field if non-nil, zero value otherwise.
### GetSellPriceOk
`func (o *MarketTradeGood) GetSellPriceOk() (*int32, bool)`
GetSellPriceOk returns a tuple with the SellPrice field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSellPrice
`func (o *MarketTradeGood) SetSellPrice(v int32)`
SetSellPrice sets SellPrice field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

198
docs/MarketTransaction.md Normal file
View File

@ -0,0 +1,198 @@
# MarketTransaction
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**WaypointSymbol** | **string** | The symbol of the waypoint where the transaction took place. |
**ShipSymbol** | **string** | The symbol of the ship that made the transaction. |
**TradeSymbol** | **string** | The symbol of the trade good. |
**Type** | **string** | The type of transaction. |
**Units** | **int32** | The number of units of the transaction. |
**PricePerUnit** | **int32** | The price per unit of the transaction. |
**TotalPrice** | **int32** | The total price of the transaction. |
**Timestamp** | **time.Time** | The timestamp of the transaction. |
## Methods
### NewMarketTransaction
`func NewMarketTransaction(waypointSymbol string, shipSymbol string, tradeSymbol string, type_ string, units int32, pricePerUnit int32, totalPrice int32, timestamp time.Time, ) *MarketTransaction`
NewMarketTransaction instantiates a new MarketTransaction object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewMarketTransactionWithDefaults
`func NewMarketTransactionWithDefaults() *MarketTransaction`
NewMarketTransactionWithDefaults instantiates a new MarketTransaction object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetWaypointSymbol
`func (o *MarketTransaction) GetWaypointSymbol() string`
GetWaypointSymbol returns the WaypointSymbol field if non-nil, zero value otherwise.
### GetWaypointSymbolOk
`func (o *MarketTransaction) GetWaypointSymbolOk() (*string, bool)`
GetWaypointSymbolOk returns a tuple with the WaypointSymbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetWaypointSymbol
`func (o *MarketTransaction) SetWaypointSymbol(v string)`
SetWaypointSymbol sets WaypointSymbol field to given value.
### GetShipSymbol
`func (o *MarketTransaction) GetShipSymbol() string`
GetShipSymbol returns the ShipSymbol field if non-nil, zero value otherwise.
### GetShipSymbolOk
`func (o *MarketTransaction) GetShipSymbolOk() (*string, bool)`
GetShipSymbolOk returns a tuple with the ShipSymbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetShipSymbol
`func (o *MarketTransaction) SetShipSymbol(v string)`
SetShipSymbol sets ShipSymbol field to given value.
### GetTradeSymbol
`func (o *MarketTransaction) GetTradeSymbol() string`
GetTradeSymbol returns the TradeSymbol field if non-nil, zero value otherwise.
### GetTradeSymbolOk
`func (o *MarketTransaction) GetTradeSymbolOk() (*string, bool)`
GetTradeSymbolOk returns a tuple with the TradeSymbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetTradeSymbol
`func (o *MarketTransaction) SetTradeSymbol(v string)`
SetTradeSymbol sets TradeSymbol field to given value.
### GetType
`func (o *MarketTransaction) GetType() string`
GetType returns the Type field if non-nil, zero value otherwise.
### GetTypeOk
`func (o *MarketTransaction) GetTypeOk() (*string, bool)`
GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetType
`func (o *MarketTransaction) SetType(v string)`
SetType sets Type field to given value.
### GetUnits
`func (o *MarketTransaction) GetUnits() int32`
GetUnits returns the Units field if non-nil, zero value otherwise.
### GetUnitsOk
`func (o *MarketTransaction) GetUnitsOk() (*int32, bool)`
GetUnitsOk returns a tuple with the Units field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetUnits
`func (o *MarketTransaction) SetUnits(v int32)`
SetUnits sets Units field to given value.
### GetPricePerUnit
`func (o *MarketTransaction) GetPricePerUnit() int32`
GetPricePerUnit returns the PricePerUnit field if non-nil, zero value otherwise.
### GetPricePerUnitOk
`func (o *MarketTransaction) GetPricePerUnitOk() (*int32, bool)`
GetPricePerUnitOk returns a tuple with the PricePerUnit field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetPricePerUnit
`func (o *MarketTransaction) SetPricePerUnit(v int32)`
SetPricePerUnit sets PricePerUnit field to given value.
### GetTotalPrice
`func (o *MarketTransaction) GetTotalPrice() int32`
GetTotalPrice returns the TotalPrice field if non-nil, zero value otherwise.
### GetTotalPriceOk
`func (o *MarketTransaction) GetTotalPriceOk() (*int32, bool)`
GetTotalPriceOk returns a tuple with the TotalPrice field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetTotalPrice
`func (o *MarketTransaction) SetTotalPrice(v int32)`
SetTotalPrice sets TotalPrice field to given value.
### GetTimestamp
`func (o *MarketTransaction) GetTimestamp() time.Time`
GetTimestamp returns the Timestamp field if non-nil, zero value otherwise.
### GetTimestampOk
`func (o *MarketTransaction) GetTimestampOk() (*time.Time, bool)`
GetTimestampOk returns a tuple with the Timestamp field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetTimestamp
`func (o *MarketTransaction) SetTimestamp(v time.Time)`
SetTimestamp sets Timestamp field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

93
docs/Meta.md Normal file
View File

@ -0,0 +1,93 @@
# Meta
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Total** | **int32** | |
**Page** | **int32** | |
**Limit** | **int32** | |
## Methods
### NewMeta
`func NewMeta(total int32, page int32, limit int32, ) *Meta`
NewMeta instantiates a new Meta object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewMetaWithDefaults
`func NewMetaWithDefaults() *Meta`
NewMetaWithDefaults instantiates a new Meta object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetTotal
`func (o *Meta) GetTotal() int32`
GetTotal returns the Total field if non-nil, zero value otherwise.
### GetTotalOk
`func (o *Meta) GetTotalOk() (*int32, bool)`
GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetTotal
`func (o *Meta) SetTotal(v int32)`
SetTotal sets Total field to given value.
### GetPage
`func (o *Meta) GetPage() int32`
GetPage returns the Page field if non-nil, zero value otherwise.
### GetPageOk
`func (o *Meta) GetPageOk() (*int32, bool)`
GetPageOk returns a tuple with the Page field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetPage
`func (o *Meta) SetPage(v int32)`
SetPage sets Page field to given value.
### GetLimit
`func (o *Meta) GetLimit() int32`
GetLimit returns the Limit field if non-nil, zero value otherwise.
### GetLimitOk
`func (o *Meta) GetLimitOk() (*int32, bool)`
GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetLimit
`func (o *Meta) SetLimit(v int32)`
SetLimit sets Limit field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# NavigateShip200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**NavigateShip200ResponseData**](NavigateShip200ResponseData.md) | |
## Methods
### NewNavigateShip200Response
`func NewNavigateShip200Response(data NavigateShip200ResponseData, ) *NavigateShip200Response`
NewNavigateShip200Response instantiates a new NavigateShip200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewNavigateShip200ResponseWithDefaults
`func NewNavigateShip200ResponseWithDefaults() *NavigateShip200Response`
NewNavigateShip200ResponseWithDefaults instantiates a new NavigateShip200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *NavigateShip200Response) GetData() NavigateShip200ResponseData`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *NavigateShip200Response) GetDataOk() (*NavigateShip200ResponseData, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *NavigateShip200Response) SetData(v NavigateShip200ResponseData)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,72 @@
# NavigateShip200ResponseData
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Fuel** | [**ShipFuel**](ShipFuel.md) | |
**Nav** | [**ShipNav**](ShipNav.md) | |
## Methods
### NewNavigateShip200ResponseData
`func NewNavigateShip200ResponseData(fuel ShipFuel, nav ShipNav, ) *NavigateShip200ResponseData`
NewNavigateShip200ResponseData instantiates a new NavigateShip200ResponseData object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewNavigateShip200ResponseDataWithDefaults
`func NewNavigateShip200ResponseDataWithDefaults() *NavigateShip200ResponseData`
NewNavigateShip200ResponseDataWithDefaults instantiates a new NavigateShip200ResponseData object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetFuel
`func (o *NavigateShip200ResponseData) GetFuel() ShipFuel`
GetFuel returns the Fuel field if non-nil, zero value otherwise.
### GetFuelOk
`func (o *NavigateShip200ResponseData) GetFuelOk() (*ShipFuel, bool)`
GetFuelOk returns a tuple with the Fuel field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetFuel
`func (o *NavigateShip200ResponseData) SetFuel(v ShipFuel)`
SetFuel sets Fuel field to given value.
### GetNav
`func (o *NavigateShip200ResponseData) GetNav() ShipNav`
GetNav returns the Nav field if non-nil, zero value otherwise.
### GetNavOk
`func (o *NavigateShip200ResponseData) GetNavOk() (*ShipNav, bool)`
GetNavOk returns a tuple with the Nav field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetNav
`func (o *NavigateShip200ResponseData) SetNav(v ShipNav)`
SetNav sets Nav field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# NavigateShipRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**WaypointSymbol** | **string** | The target destination. |
## Methods
### NewNavigateShipRequest
`func NewNavigateShipRequest(waypointSymbol string, ) *NavigateShipRequest`
NewNavigateShipRequest instantiates a new NavigateShipRequest object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewNavigateShipRequestWithDefaults
`func NewNavigateShipRequestWithDefaults() *NavigateShipRequest`
NewNavigateShipRequestWithDefaults instantiates a new NavigateShipRequest object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetWaypointSymbol
`func (o *NavigateShipRequest) GetWaypointSymbol() string`
GetWaypointSymbol returns the WaypointSymbol field if non-nil, zero value otherwise.
### GetWaypointSymbolOk
`func (o *NavigateShipRequest) GetWaypointSymbolOk() (*string, bool)`
GetWaypointSymbolOk returns a tuple with the WaypointSymbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetWaypointSymbol
`func (o *NavigateShipRequest) SetWaypointSymbol(v string)`
SetWaypointSymbol sets WaypointSymbol field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# OrbitShip200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**OrbitShip200ResponseData**](OrbitShip200ResponseData.md) | |
## Methods
### NewOrbitShip200Response
`func NewOrbitShip200Response(data OrbitShip200ResponseData, ) *OrbitShip200Response`
NewOrbitShip200Response instantiates a new OrbitShip200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewOrbitShip200ResponseWithDefaults
`func NewOrbitShip200ResponseWithDefaults() *OrbitShip200Response`
NewOrbitShip200ResponseWithDefaults instantiates a new OrbitShip200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *OrbitShip200Response) GetData() OrbitShip200ResponseData`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *OrbitShip200Response) GetDataOk() (*OrbitShip200ResponseData, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *OrbitShip200Response) SetData(v OrbitShip200ResponseData)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# OrbitShip200ResponseData
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Nav** | [**ShipNav**](ShipNav.md) | |
## Methods
### NewOrbitShip200ResponseData
`func NewOrbitShip200ResponseData(nav ShipNav, ) *OrbitShip200ResponseData`
NewOrbitShip200ResponseData instantiates a new OrbitShip200ResponseData object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewOrbitShip200ResponseDataWithDefaults
`func NewOrbitShip200ResponseDataWithDefaults() *OrbitShip200ResponseData`
NewOrbitShip200ResponseDataWithDefaults instantiates a new OrbitShip200ResponseData object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetNav
`func (o *OrbitShip200ResponseData) GetNav() ShipNav`
GetNav returns the Nav field if non-nil, zero value otherwise.
### GetNavOk
`func (o *OrbitShip200ResponseData) GetNavOk() (*ShipNav, bool)`
GetNavOk returns a tuple with the Nav field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetNav
`func (o *OrbitShip200ResponseData) SetNav(v ShipNav)`
SetNav sets Nav field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,56 @@
# PatchShipNavRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**FlightMode** | Pointer to [**ShipNavFlightMode**](ShipNavFlightMode.md) | | [optional] [default to SHIPNAVFLIGHTMODE_CRUISE]
## Methods
### NewPatchShipNavRequest
`func NewPatchShipNavRequest() *PatchShipNavRequest`
NewPatchShipNavRequest instantiates a new PatchShipNavRequest object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewPatchShipNavRequestWithDefaults
`func NewPatchShipNavRequestWithDefaults() *PatchShipNavRequest`
NewPatchShipNavRequestWithDefaults instantiates a new PatchShipNavRequest object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetFlightMode
`func (o *PatchShipNavRequest) GetFlightMode() ShipNavFlightMode`
GetFlightMode returns the FlightMode field if non-nil, zero value otherwise.
### GetFlightModeOk
`func (o *PatchShipNavRequest) GetFlightModeOk() (*ShipNavFlightMode, bool)`
GetFlightModeOk returns a tuple with the FlightMode field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetFlightMode
`func (o *PatchShipNavRequest) SetFlightMode(v ShipNavFlightMode)`
SetFlightMode sets FlightMode field to given value.
### HasFlightMode
`func (o *PatchShipNavRequest) HasFlightMode() bool`
HasFlightMode returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# PurchaseCargo201Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**SellCargo201ResponseData**](SellCargo201ResponseData.md) | |
## Methods
### NewPurchaseCargo201Response
`func NewPurchaseCargo201Response(data SellCargo201ResponseData, ) *PurchaseCargo201Response`
NewPurchaseCargo201Response instantiates a new PurchaseCargo201Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewPurchaseCargo201ResponseWithDefaults
`func NewPurchaseCargo201ResponseWithDefaults() *PurchaseCargo201Response`
NewPurchaseCargo201ResponseWithDefaults instantiates a new PurchaseCargo201Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *PurchaseCargo201Response) GetData() SellCargo201ResponseData`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *PurchaseCargo201Response) GetDataOk() (*SellCargo201ResponseData, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *PurchaseCargo201Response) SetData(v SellCargo201ResponseData)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,72 @@
# PurchaseCargoRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Symbol** | **string** | |
**Units** | **int32** | |
## Methods
### NewPurchaseCargoRequest
`func NewPurchaseCargoRequest(symbol string, units int32, ) *PurchaseCargoRequest`
NewPurchaseCargoRequest instantiates a new PurchaseCargoRequest object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewPurchaseCargoRequestWithDefaults
`func NewPurchaseCargoRequestWithDefaults() *PurchaseCargoRequest`
NewPurchaseCargoRequestWithDefaults instantiates a new PurchaseCargoRequest object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetSymbol
`func (o *PurchaseCargoRequest) GetSymbol() string`
GetSymbol returns the Symbol field if non-nil, zero value otherwise.
### GetSymbolOk
`func (o *PurchaseCargoRequest) GetSymbolOk() (*string, bool)`
GetSymbolOk returns a tuple with the Symbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSymbol
`func (o *PurchaseCargoRequest) SetSymbol(v string)`
SetSymbol sets Symbol field to given value.
### GetUnits
`func (o *PurchaseCargoRequest) GetUnits() int32`
GetUnits returns the Units field if non-nil, zero value otherwise.
### GetUnitsOk
`func (o *PurchaseCargoRequest) GetUnitsOk() (*int32, bool)`
GetUnitsOk returns a tuple with the Units field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetUnits
`func (o *PurchaseCargoRequest) SetUnits(v int32)`
SetUnits sets Units field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# PurchaseShip201Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**PurchaseShip201ResponseData**](PurchaseShip201ResponseData.md) | |
## Methods
### NewPurchaseShip201Response
`func NewPurchaseShip201Response(data PurchaseShip201ResponseData, ) *PurchaseShip201Response`
NewPurchaseShip201Response instantiates a new PurchaseShip201Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewPurchaseShip201ResponseWithDefaults
`func NewPurchaseShip201ResponseWithDefaults() *PurchaseShip201Response`
NewPurchaseShip201ResponseWithDefaults instantiates a new PurchaseShip201Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *PurchaseShip201Response) GetData() PurchaseShip201ResponseData`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *PurchaseShip201Response) GetDataOk() (*PurchaseShip201ResponseData, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *PurchaseShip201Response) SetData(v PurchaseShip201ResponseData)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,93 @@
# PurchaseShip201ResponseData
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Agent** | [**Agent**](Agent.md) | |
**Ship** | [**Ship**](Ship.md) | |
**Transaction** | [**ShipyardTransaction**](ShipyardTransaction.md) | |
## Methods
### NewPurchaseShip201ResponseData
`func NewPurchaseShip201ResponseData(agent Agent, ship Ship, transaction ShipyardTransaction, ) *PurchaseShip201ResponseData`
NewPurchaseShip201ResponseData instantiates a new PurchaseShip201ResponseData object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewPurchaseShip201ResponseDataWithDefaults
`func NewPurchaseShip201ResponseDataWithDefaults() *PurchaseShip201ResponseData`
NewPurchaseShip201ResponseDataWithDefaults instantiates a new PurchaseShip201ResponseData object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetAgent
`func (o *PurchaseShip201ResponseData) GetAgent() Agent`
GetAgent returns the Agent field if non-nil, zero value otherwise.
### GetAgentOk
`func (o *PurchaseShip201ResponseData) GetAgentOk() (*Agent, bool)`
GetAgentOk returns a tuple with the Agent field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetAgent
`func (o *PurchaseShip201ResponseData) SetAgent(v Agent)`
SetAgent sets Agent field to given value.
### GetShip
`func (o *PurchaseShip201ResponseData) GetShip() Ship`
GetShip returns the Ship field if non-nil, zero value otherwise.
### GetShipOk
`func (o *PurchaseShip201ResponseData) GetShipOk() (*Ship, bool)`
GetShipOk returns a tuple with the Ship field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetShip
`func (o *PurchaseShip201ResponseData) SetShip(v Ship)`
SetShip sets Ship field to given value.
### GetTransaction
`func (o *PurchaseShip201ResponseData) GetTransaction() ShipyardTransaction`
GetTransaction returns the Transaction field if non-nil, zero value otherwise.
### GetTransactionOk
`func (o *PurchaseShip201ResponseData) GetTransactionOk() (*ShipyardTransaction, bool)`
GetTransactionOk returns a tuple with the Transaction field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetTransaction
`func (o *PurchaseShip201ResponseData) SetTransaction(v ShipyardTransaction)`
SetTransaction sets Transaction field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,72 @@
# PurchaseShipRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ShipType** | [**ShipType**](ShipType.md) | |
**WaypointSymbol** | **string** | The symbol of the waypoint you want to purchase the ship at. |
## Methods
### NewPurchaseShipRequest
`func NewPurchaseShipRequest(shipType ShipType, waypointSymbol string, ) *PurchaseShipRequest`
NewPurchaseShipRequest instantiates a new PurchaseShipRequest object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewPurchaseShipRequestWithDefaults
`func NewPurchaseShipRequestWithDefaults() *PurchaseShipRequest`
NewPurchaseShipRequestWithDefaults instantiates a new PurchaseShipRequest object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetShipType
`func (o *PurchaseShipRequest) GetShipType() ShipType`
GetShipType returns the ShipType field if non-nil, zero value otherwise.
### GetShipTypeOk
`func (o *PurchaseShipRequest) GetShipTypeOk() (*ShipType, bool)`
GetShipTypeOk returns a tuple with the ShipType field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetShipType
`func (o *PurchaseShipRequest) SetShipType(v ShipType)`
SetShipType sets ShipType field to given value.
### GetWaypointSymbol
`func (o *PurchaseShipRequest) GetWaypointSymbol() string`
GetWaypointSymbol returns the WaypointSymbol field if non-nil, zero value otherwise.
### GetWaypointSymbolOk
`func (o *PurchaseShipRequest) GetWaypointSymbolOk() (*string, bool)`
GetWaypointSymbolOk returns a tuple with the WaypointSymbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetWaypointSymbol
`func (o *PurchaseShipRequest) SetWaypointSymbol(v string)`
SetWaypointSymbol sets WaypointSymbol field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# RefuelShip200Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**RefuelShip200ResponseData**](RefuelShip200ResponseData.md) | |
## Methods
### NewRefuelShip200Response
`func NewRefuelShip200Response(data RefuelShip200ResponseData, ) *RefuelShip200Response`
NewRefuelShip200Response instantiates a new RefuelShip200Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewRefuelShip200ResponseWithDefaults
`func NewRefuelShip200ResponseWithDefaults() *RefuelShip200Response`
NewRefuelShip200ResponseWithDefaults instantiates a new RefuelShip200Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *RefuelShip200Response) GetData() RefuelShip200ResponseData`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *RefuelShip200Response) GetDataOk() (*RefuelShip200ResponseData, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *RefuelShip200Response) SetData(v RefuelShip200ResponseData)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,72 @@
# RefuelShip200ResponseData
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Agent** | [**Agent**](Agent.md) | |
**Fuel** | [**ShipFuel**](ShipFuel.md) | |
## Methods
### NewRefuelShip200ResponseData
`func NewRefuelShip200ResponseData(agent Agent, fuel ShipFuel, ) *RefuelShip200ResponseData`
NewRefuelShip200ResponseData instantiates a new RefuelShip200ResponseData object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewRefuelShip200ResponseDataWithDefaults
`func NewRefuelShip200ResponseDataWithDefaults() *RefuelShip200ResponseData`
NewRefuelShip200ResponseDataWithDefaults instantiates a new RefuelShip200ResponseData object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetAgent
`func (o *RefuelShip200ResponseData) GetAgent() Agent`
GetAgent returns the Agent field if non-nil, zero value otherwise.
### GetAgentOk
`func (o *RefuelShip200ResponseData) GetAgentOk() (*Agent, bool)`
GetAgentOk returns a tuple with the Agent field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetAgent
`func (o *RefuelShip200ResponseData) SetAgent(v Agent)`
SetAgent sets Agent field to given value.
### GetFuel
`func (o *RefuelShip200ResponseData) GetFuel() ShipFuel`
GetFuel returns the Fuel field if non-nil, zero value otherwise.
### GetFuelOk
`func (o *RefuelShip200ResponseData) GetFuelOk() (*ShipFuel, bool)`
GetFuelOk returns a tuple with the Fuel field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetFuel
`func (o *RefuelShip200ResponseData) SetFuel(v ShipFuel)`
SetFuel sets Fuel field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# Register201Response
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Data** | [**Register201ResponseData**](Register201ResponseData.md) | |
## Methods
### NewRegister201Response
`func NewRegister201Response(data Register201ResponseData, ) *Register201Response`
NewRegister201Response instantiates a new Register201Response object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewRegister201ResponseWithDefaults
`func NewRegister201ResponseWithDefaults() *Register201Response`
NewRegister201ResponseWithDefaults instantiates a new Register201Response object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetData
`func (o *Register201Response) GetData() Register201ResponseData`
GetData returns the Data field if non-nil, zero value otherwise.
### GetDataOk
`func (o *Register201Response) GetDataOk() (*Register201ResponseData, bool)`
GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetData
`func (o *Register201Response) SetData(v Register201ResponseData)`
SetData sets Data field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,135 @@
# Register201ResponseData
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Agent** | [**Agent**](Agent.md) | |
**Contract** | [**Contract**](Contract.md) | |
**Faction** | [**Faction**](Faction.md) | |
**Ship** | [**Ship**](Ship.md) | |
**Token** | **string** | A Bearer token for accessing secured API endpoints. |
## Methods
### NewRegister201ResponseData
`func NewRegister201ResponseData(agent Agent, contract Contract, faction Faction, ship Ship, token string, ) *Register201ResponseData`
NewRegister201ResponseData instantiates a new Register201ResponseData object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewRegister201ResponseDataWithDefaults
`func NewRegister201ResponseDataWithDefaults() *Register201ResponseData`
NewRegister201ResponseDataWithDefaults instantiates a new Register201ResponseData object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetAgent
`func (o *Register201ResponseData) GetAgent() Agent`
GetAgent returns the Agent field if non-nil, zero value otherwise.
### GetAgentOk
`func (o *Register201ResponseData) GetAgentOk() (*Agent, bool)`
GetAgentOk returns a tuple with the Agent field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetAgent
`func (o *Register201ResponseData) SetAgent(v Agent)`
SetAgent sets Agent field to given value.
### GetContract
`func (o *Register201ResponseData) GetContract() Contract`
GetContract returns the Contract field if non-nil, zero value otherwise.
### GetContractOk
`func (o *Register201ResponseData) GetContractOk() (*Contract, bool)`
GetContractOk returns a tuple with the Contract field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetContract
`func (o *Register201ResponseData) SetContract(v Contract)`
SetContract sets Contract field to given value.
### GetFaction
`func (o *Register201ResponseData) GetFaction() Faction`
GetFaction returns the Faction field if non-nil, zero value otherwise.
### GetFactionOk
`func (o *Register201ResponseData) GetFactionOk() (*Faction, bool)`
GetFactionOk returns a tuple with the Faction field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetFaction
`func (o *Register201ResponseData) SetFaction(v Faction)`
SetFaction sets Faction field to given value.
### GetShip
`func (o *Register201ResponseData) GetShip() Ship`
GetShip returns the Ship field if non-nil, zero value otherwise.
### GetShipOk
`func (o *Register201ResponseData) GetShipOk() (*Ship, bool)`
GetShipOk returns a tuple with the Ship field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetShip
`func (o *Register201ResponseData) SetShip(v Ship)`
SetShip sets Ship field to given value.
### GetToken
`func (o *Register201ResponseData) GetToken() string`
GetToken returns the Token field if non-nil, zero value otherwise.
### GetTokenOk
`func (o *Register201ResponseData) GetTokenOk() (*string, bool)`
GetTokenOk returns a tuple with the Token field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetToken
`func (o *Register201ResponseData) SetToken(v string)`
SetToken sets Token field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

72
docs/RegisterRequest.md Normal file
View File

@ -0,0 +1,72 @@
# RegisterRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Faction** | **string** | The faction you choose determines your headquarters. |
**Symbol** | **string** | How other agents will see your ships and information. |
## Methods
### NewRegisterRequest
`func NewRegisterRequest(faction string, symbol string, ) *RegisterRequest`
NewRegisterRequest instantiates a new RegisterRequest object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewRegisterRequestWithDefaults
`func NewRegisterRequestWithDefaults() *RegisterRequest`
NewRegisterRequestWithDefaults instantiates a new RegisterRequest object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetFaction
`func (o *RegisterRequest) GetFaction() string`
GetFaction returns the Faction field if non-nil, zero value otherwise.
### GetFactionOk
`func (o *RegisterRequest) GetFactionOk() (*string, bool)`
GetFactionOk returns a tuple with the Faction field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetFaction
`func (o *RegisterRequest) SetFaction(v string)`
SetFaction sets Faction field to given value.
### GetSymbol
`func (o *RegisterRequest) GetSymbol() string`
GetSymbol returns the Symbol field if non-nil, zero value otherwise.
### GetSymbolOk
`func (o *RegisterRequest) GetSymbolOk() (*string, bool)`
GetSymbolOk returns a tuple with the Symbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSymbol
`func (o *RegisterRequest) SetSymbol(v string)`
SetSymbol sets Symbol field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

192
docs/ScannedShip.md Normal file
View File

@ -0,0 +1,192 @@
# ScannedShip
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Symbol** | **string** | The globally unique identifier of the ship. |
**Registration** | [**ShipRegistration**](ShipRegistration.md) | |
**Nav** | [**ShipNav**](ShipNav.md) | |
**Frame** | Pointer to [**ScannedShipFrame**](ScannedShipFrame.md) | | [optional]
**Reactor** | Pointer to [**ScannedShipReactor**](ScannedShipReactor.md) | | [optional]
**Engine** | [**ScannedShipEngine**](ScannedShipEngine.md) | |
**Mounts** | Pointer to [**[]ScannedShipMountsInner**](ScannedShipMountsInner.md) | | [optional]
## Methods
### NewScannedShip
`func NewScannedShip(symbol string, registration ShipRegistration, nav ShipNav, engine ScannedShipEngine, ) *ScannedShip`
NewScannedShip instantiates a new ScannedShip object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewScannedShipWithDefaults
`func NewScannedShipWithDefaults() *ScannedShip`
NewScannedShipWithDefaults instantiates a new ScannedShip object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetSymbol
`func (o *ScannedShip) GetSymbol() string`
GetSymbol returns the Symbol field if non-nil, zero value otherwise.
### GetSymbolOk
`func (o *ScannedShip) GetSymbolOk() (*string, bool)`
GetSymbolOk returns a tuple with the Symbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSymbol
`func (o *ScannedShip) SetSymbol(v string)`
SetSymbol sets Symbol field to given value.
### GetRegistration
`func (o *ScannedShip) GetRegistration() ShipRegistration`
GetRegistration returns the Registration field if non-nil, zero value otherwise.
### GetRegistrationOk
`func (o *ScannedShip) GetRegistrationOk() (*ShipRegistration, bool)`
GetRegistrationOk returns a tuple with the Registration field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetRegistration
`func (o *ScannedShip) SetRegistration(v ShipRegistration)`
SetRegistration sets Registration field to given value.
### GetNav
`func (o *ScannedShip) GetNav() ShipNav`
GetNav returns the Nav field if non-nil, zero value otherwise.
### GetNavOk
`func (o *ScannedShip) GetNavOk() (*ShipNav, bool)`
GetNavOk returns a tuple with the Nav field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetNav
`func (o *ScannedShip) SetNav(v ShipNav)`
SetNav sets Nav field to given value.
### GetFrame
`func (o *ScannedShip) GetFrame() ScannedShipFrame`
GetFrame returns the Frame field if non-nil, zero value otherwise.
### GetFrameOk
`func (o *ScannedShip) GetFrameOk() (*ScannedShipFrame, bool)`
GetFrameOk returns a tuple with the Frame field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetFrame
`func (o *ScannedShip) SetFrame(v ScannedShipFrame)`
SetFrame sets Frame field to given value.
### HasFrame
`func (o *ScannedShip) HasFrame() bool`
HasFrame returns a boolean if a field has been set.
### GetReactor
`func (o *ScannedShip) GetReactor() ScannedShipReactor`
GetReactor returns the Reactor field if non-nil, zero value otherwise.
### GetReactorOk
`func (o *ScannedShip) GetReactorOk() (*ScannedShipReactor, bool)`
GetReactorOk returns a tuple with the Reactor field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetReactor
`func (o *ScannedShip) SetReactor(v ScannedShipReactor)`
SetReactor sets Reactor field to given value.
### HasReactor
`func (o *ScannedShip) HasReactor() bool`
HasReactor returns a boolean if a field has been set.
### GetEngine
`func (o *ScannedShip) GetEngine() ScannedShipEngine`
GetEngine returns the Engine field if non-nil, zero value otherwise.
### GetEngineOk
`func (o *ScannedShip) GetEngineOk() (*ScannedShipEngine, bool)`
GetEngineOk returns a tuple with the Engine field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetEngine
`func (o *ScannedShip) SetEngine(v ScannedShipEngine)`
SetEngine sets Engine field to given value.
### GetMounts
`func (o *ScannedShip) GetMounts() []ScannedShipMountsInner`
GetMounts returns the Mounts field if non-nil, zero value otherwise.
### GetMountsOk
`func (o *ScannedShip) GetMountsOk() (*[]ScannedShipMountsInner, bool)`
GetMountsOk returns a tuple with the Mounts field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetMounts
`func (o *ScannedShip) SetMounts(v []ScannedShipMountsInner)`
SetMounts sets Mounts field to given value.
### HasMounts
`func (o *ScannedShip) HasMounts() bool`
HasMounts returns a boolean if a field has been set.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

51
docs/ScannedShipEngine.md Normal file
View File

@ -0,0 +1,51 @@
# ScannedShipEngine
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Symbol** | **string** | |
## Methods
### NewScannedShipEngine
`func NewScannedShipEngine(symbol string, ) *ScannedShipEngine`
NewScannedShipEngine instantiates a new ScannedShipEngine object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewScannedShipEngineWithDefaults
`func NewScannedShipEngineWithDefaults() *ScannedShipEngine`
NewScannedShipEngineWithDefaults instantiates a new ScannedShipEngine object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetSymbol
`func (o *ScannedShipEngine) GetSymbol() string`
GetSymbol returns the Symbol field if non-nil, zero value otherwise.
### GetSymbolOk
`func (o *ScannedShipEngine) GetSymbolOk() (*string, bool)`
GetSymbolOk returns a tuple with the Symbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSymbol
`func (o *ScannedShipEngine) SetSymbol(v string)`
SetSymbol sets Symbol field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

51
docs/ScannedShipFrame.md Normal file
View File

@ -0,0 +1,51 @@
# ScannedShipFrame
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Symbol** | **string** | |
## Methods
### NewScannedShipFrame
`func NewScannedShipFrame(symbol string, ) *ScannedShipFrame`
NewScannedShipFrame instantiates a new ScannedShipFrame object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewScannedShipFrameWithDefaults
`func NewScannedShipFrameWithDefaults() *ScannedShipFrame`
NewScannedShipFrameWithDefaults instantiates a new ScannedShipFrame object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetSymbol
`func (o *ScannedShipFrame) GetSymbol() string`
GetSymbol returns the Symbol field if non-nil, zero value otherwise.
### GetSymbolOk
`func (o *ScannedShipFrame) GetSymbolOk() (*string, bool)`
GetSymbolOk returns a tuple with the Symbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSymbol
`func (o *ScannedShipFrame) SetSymbol(v string)`
SetSymbol sets Symbol field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,51 @@
# ScannedShipMountsInner
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Symbol** | **string** | |
## Methods
### NewScannedShipMountsInner
`func NewScannedShipMountsInner(symbol string, ) *ScannedShipMountsInner`
NewScannedShipMountsInner instantiates a new ScannedShipMountsInner object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed
### NewScannedShipMountsInnerWithDefaults
`func NewScannedShipMountsInnerWithDefaults() *ScannedShipMountsInner`
NewScannedShipMountsInnerWithDefaults instantiates a new ScannedShipMountsInner object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set
### GetSymbol
`func (o *ScannedShipMountsInner) GetSymbol() string`
GetSymbol returns the Symbol field if non-nil, zero value otherwise.
### GetSymbolOk
`func (o *ScannedShipMountsInner) GetSymbolOk() (*string, bool)`
GetSymbolOk returns a tuple with the Symbol field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.
### SetSymbol
`func (o *ScannedShipMountsInner) SetSymbol(v string)`
SetSymbol sets Symbol field to given value.
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Some files were not shown because too many files have changed in this diff Show More