All URIs are relative to https://api.spacetraders.io/v2
Method | HTTP request | Description |
---|---|---|
CreateChart | Post /my/ships/{shipSymbol}/chart | Create Chart |
CreateShipShipScan | Post /my/ships/{shipSymbol}/scan/ships | Scan Ships |
CreateShipSystemScan | Post /my/ships/{shipSymbol}/scan/systems | Scan Systems |
CreateShipWaypointScan | Post /my/ships/{shipSymbol}/scan/waypoints | Scan Waypoints |
CreateSurvey | Post /my/ships/{shipSymbol}/survey | Create Survey |
DockShip | Post /my/ships/{shipSymbol}/dock | Dock Ship |
ExtractResources | Post /my/ships/{shipSymbol}/extract | Extract Resources |
ExtractResourcesWithSurvey | Post /my/ships/{shipSymbol}/extract/survey | Extract Resources with Survey |
GetMounts | Get /my/ships/{shipSymbol}/mounts | Get Mounts |
GetMyShip | Get /my/ships/{shipSymbol} | Get Ship |
GetMyShipCargo | Get /my/ships/{shipSymbol}/cargo | Get Ship Cargo |
GetMyShips | Get /my/ships | List Ships |
GetRepairShip | Get /my/ships/{shipSymbol}/repair | Get Repair Ship |
GetScrapShip | Get /my/ships/{shipSymbol}/scrap | Get Scrap Ship |
GetShipCooldown | Get /my/ships/{shipSymbol}/cooldown | Get Ship Cooldown |
GetShipNav | Get /my/ships/{shipSymbol}/nav | Get Ship Nav |
InstallMount | Post /my/ships/{shipSymbol}/mounts/install | Install Mount |
Jettison | Post /my/ships/{shipSymbol}/jettison | Jettison Cargo |
JumpShip | Post /my/ships/{shipSymbol}/jump | Jump Ship |
NavigateShip | Post /my/ships/{shipSymbol}/navigate | Navigate Ship |
NegotiateContract | Post /my/ships/{shipSymbol}/negotiate/contract | Negotiate Contract |
OrbitShip | Post /my/ships/{shipSymbol}/orbit | Orbit Ship |
PatchShipNav | Patch /my/ships/{shipSymbol}/nav | Patch Ship Nav |
PurchaseCargo | Post /my/ships/{shipSymbol}/purchase | Purchase Cargo |
PurchaseShip | Post /my/ships | Purchase Ship |
RefuelShip | Post /my/ships/{shipSymbol}/refuel | Refuel Ship |
RemoveMount | Post /my/ships/{shipSymbol}/mounts/remove | Remove Mount |
RepairShip | Post /my/ships/{shipSymbol}/repair | Repair Ship |
ScrapShip | Post /my/ships/{shipSymbol}/scrap | Scrap Ship |
SellCargo | Post /my/ships/{shipSymbol}/sell | Sell Cargo |
ShipRefine | Post /my/ships/{shipSymbol}/refine | Ship Refine |
SiphonResources | Post /my/ships/{shipSymbol}/siphon | Siphon Resources |
TransferCargo | Post /my/ships/{shipSymbol}/transfer | Transfer Cargo |
WarpShip | Post /my/ships/{shipSymbol}/warp | Warp Ship |
CreateChart201Response CreateChart(ctx, shipSymbol).Execute()
Create Chart
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The symbol of the ship.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.CreateChart(context.Background(), shipSymbol).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.CreateChart``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateChart`: CreateChart201Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.CreateChart`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The symbol of the ship. |
Other parameters are passed through a pointer to a apiCreateChartRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateShipShipScan201Response CreateShipShipScan(ctx, shipSymbol).Execute()
Scan Ships
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The ship symbol.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.CreateShipShipScan(context.Background(), shipSymbol).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.CreateShipShipScan``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateShipShipScan`: CreateShipShipScan201Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.CreateShipShipScan`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The ship symbol. |
Other parameters are passed through a pointer to a apiCreateShipShipScanRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateShipSystemScan201Response CreateShipSystemScan(ctx, shipSymbol).Execute()
Scan Systems
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The ship symbol.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.CreateShipSystemScan(context.Background(), shipSymbol).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.CreateShipSystemScan``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateShipSystemScan`: CreateShipSystemScan201Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.CreateShipSystemScan`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The ship symbol. |
Other parameters are passed through a pointer to a apiCreateShipSystemScanRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
CreateShipSystemScan201Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateShipWaypointScan201Response CreateShipWaypointScan(ctx, shipSymbol).Execute()
Scan Waypoints
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The ship symbol.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.CreateShipWaypointScan(context.Background(), shipSymbol).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.CreateShipWaypointScan``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateShipWaypointScan`: CreateShipWaypointScan201Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.CreateShipWaypointScan`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The ship symbol. |
Other parameters are passed through a pointer to a apiCreateShipWaypointScanRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
CreateShipWaypointScan201Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreateSurvey201Response CreateSurvey(ctx, shipSymbol).Execute()
Create Survey
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The symbol of the ship.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.CreateSurvey(context.Background(), shipSymbol).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.CreateSurvey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateSurvey`: CreateSurvey201Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.CreateSurvey`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The symbol of the ship. |
Other parameters are passed through a pointer to a apiCreateSurveyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DockShip200Response DockShip(ctx, shipSymbol).Execute()
Dock Ship
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The symbol of the ship.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.DockShip(context.Background(), shipSymbol).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.DockShip``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DockShip`: DockShip200Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.DockShip`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The symbol of the ship. |
Other parameters are passed through a pointer to a apiDockShipRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ExtractResources201Response ExtractResources(ctx, shipSymbol).ExtractResourcesRequest(extractResourcesRequest).Execute()
Extract Resources
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The ship symbol.
extractResourcesRequest := *openapiclient.NewExtractResourcesRequest() // ExtractResourcesRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.ExtractResources(context.Background(), shipSymbol).ExtractResourcesRequest(extractResourcesRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.ExtractResources``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ExtractResources`: ExtractResources201Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.ExtractResources`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The ship symbol. |
Other parameters are passed through a pointer to a apiExtractResourcesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
extractResourcesRequest | ExtractResourcesRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ExtractResources201Response ExtractResourcesWithSurvey(ctx, shipSymbol).Survey(survey).Execute()
Extract Resources with Survey
package main
import (
"context"
"fmt"
"os"
"time"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The ship symbol.
survey := *openapiclient.NewSurvey("Signature_example", "Symbol_example", []openapiclient.SurveyDeposit{*openapiclient.NewSurveyDeposit("Symbol_example")}, time.Now(), "Size_example") // Survey | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.ExtractResourcesWithSurvey(context.Background(), shipSymbol).Survey(survey).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.ExtractResourcesWithSurvey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ExtractResourcesWithSurvey`: ExtractResources201Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.ExtractResourcesWithSurvey`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The ship symbol. |
Other parameters are passed through a pointer to a apiExtractResourcesWithSurveyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
survey | Survey | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetMounts200Response GetMounts(ctx, shipSymbol).Execute()
Get Mounts
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The ship's symbol.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.GetMounts(context.Background(), shipSymbol).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.GetMounts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetMounts`: GetMounts200Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.GetMounts`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The ship's symbol. |
Other parameters are passed through a pointer to a apiGetMountsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetMyShip200Response GetMyShip(ctx, shipSymbol).Execute()
Get Ship
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The symbol of the ship.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.GetMyShip(context.Background(), shipSymbol).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.GetMyShip``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetMyShip`: GetMyShip200Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.GetMyShip`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The symbol of the ship. |
Other parameters are passed through a pointer to a apiGetMyShipRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetMyShipCargo200Response GetMyShipCargo(ctx, shipSymbol).Execute()
Get Ship Cargo
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The symbol of the ship.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.GetMyShipCargo(context.Background(), shipSymbol).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.GetMyShipCargo``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetMyShipCargo`: GetMyShipCargo200Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.GetMyShipCargo`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The symbol of the ship. |
Other parameters are passed through a pointer to a apiGetMyShipCargoRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetMyShips200Response GetMyShips(ctx).Page(page).Limit(limit).Execute()
List Ships
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
page := int32(56) // int32 | What entry offset to request (optional) (default to 1)
limit := int32(56) // int32 | How many entries to return per page (optional) (default to 10)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.GetMyShips(context.Background()).Page(page).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.GetMyShips``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetMyShips`: GetMyShips200Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.GetMyShips`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetMyShipsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
page | int32 | What entry offset to request | [default to 1] |
limit | int32 | How many entries to return per page | [default to 10] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetRepairShip200Response GetRepairShip(ctx, shipSymbol).Execute()
Get Repair Ship
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The ship symbol.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.GetRepairShip(context.Background(), shipSymbol).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.GetRepairShip``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetRepairShip`: GetRepairShip200Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.GetRepairShip`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The ship symbol. |
Other parameters are passed through a pointer to a apiGetRepairShipRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetScrapShip200Response GetScrapShip(ctx, shipSymbol).Execute()
Get Scrap Ship
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The ship symbol.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.GetScrapShip(context.Background(), shipSymbol).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.GetScrapShip``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetScrapShip`: GetScrapShip200Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.GetScrapShip`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The ship symbol. |
Other parameters are passed through a pointer to a apiGetScrapShipRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetShipCooldown200Response GetShipCooldown(ctx, shipSymbol).Execute()
Get Ship Cooldown
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The symbol of the ship.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.GetShipCooldown(context.Background(), shipSymbol).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.GetShipCooldown``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetShipCooldown`: GetShipCooldown200Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.GetShipCooldown`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The symbol of the ship. |
Other parameters are passed through a pointer to a apiGetShipCooldownRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetShipNav200Response GetShipNav(ctx, shipSymbol).Execute()
Get Ship Nav
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The ship symbol.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.GetShipNav(context.Background(), shipSymbol).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.GetShipNav``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetShipNav`: GetShipNav200Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.GetShipNav`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The ship symbol. |
Other parameters are passed through a pointer to a apiGetShipNavRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InstallMount201Response InstallMount(ctx, shipSymbol).InstallMountRequest(installMountRequest).Execute()
Install Mount
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The ship's symbol.
installMountRequest := *openapiclient.NewInstallMountRequest("Symbol_example") // InstallMountRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.InstallMount(context.Background(), shipSymbol).InstallMountRequest(installMountRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.InstallMount``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `InstallMount`: InstallMount201Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.InstallMount`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The ship's symbol. |
Other parameters are passed through a pointer to a apiInstallMountRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
installMountRequest | InstallMountRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Jettison200Response Jettison(ctx, shipSymbol).JettisonRequest(jettisonRequest).Execute()
Jettison Cargo
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The ship symbol.
jettisonRequest := *openapiclient.NewJettisonRequest(openapiclient.TradeSymbol("PRECIOUS_STONES"), int32(123)) // JettisonRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.Jettison(context.Background(), shipSymbol).JettisonRequest(jettisonRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.Jettison``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Jettison`: Jettison200Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.Jettison`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The ship symbol. |
Other parameters are passed through a pointer to a apiJettisonRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
jettisonRequest | JettisonRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
JumpShip200Response JumpShip(ctx, shipSymbol).JumpShipRequest(jumpShipRequest).Execute()
Jump Ship
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The ship symbol.
jumpShipRequest := *openapiclient.NewJumpShipRequest("WaypointSymbol_example") // JumpShipRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.JumpShip(context.Background(), shipSymbol).JumpShipRequest(jumpShipRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.JumpShip``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `JumpShip`: JumpShip200Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.JumpShip`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The ship symbol. |
Other parameters are passed through a pointer to a apiJumpShipRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
jumpShipRequest | JumpShipRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
NavigateShip200Response NavigateShip(ctx, shipSymbol).NavigateShipRequest(navigateShipRequest).Execute()
Navigate Ship
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The ship symbol.
navigateShipRequest := *openapiclient.NewNavigateShipRequest("WaypointSymbol_example") // NavigateShipRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.NavigateShip(context.Background(), shipSymbol).NavigateShipRequest(navigateShipRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.NavigateShip``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `NavigateShip`: NavigateShip200Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.NavigateShip`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The ship symbol. |
Other parameters are passed through a pointer to a apiNavigateShipRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
navigateShipRequest | NavigateShipRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
NegotiateContract200Response NegotiateContract(ctx, shipSymbol).Execute()
Negotiate Contract
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The ship's symbol.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.NegotiateContract(context.Background(), shipSymbol).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.NegotiateContract``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `NegotiateContract`: NegotiateContract200Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.NegotiateContract`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The ship's symbol. |
Other parameters are passed through a pointer to a apiNegotiateContractRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OrbitShip200Response OrbitShip(ctx, shipSymbol).Execute()
Orbit Ship
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The symbol of the ship.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.OrbitShip(context.Background(), shipSymbol).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.OrbitShip``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `OrbitShip`: OrbitShip200Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.OrbitShip`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The symbol of the ship. |
Other parameters are passed through a pointer to a apiOrbitShipRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetShipNav200Response PatchShipNav(ctx, shipSymbol).PatchShipNavRequest(patchShipNavRequest).Execute()
Patch Ship Nav
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The ship symbol.
patchShipNavRequest := *openapiclient.NewPatchShipNavRequest() // PatchShipNavRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.PatchShipNav(context.Background(), shipSymbol).PatchShipNavRequest(patchShipNavRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.PatchShipNav``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PatchShipNav`: GetShipNav200Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.PatchShipNav`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The ship symbol. |
Other parameters are passed through a pointer to a apiPatchShipNavRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
patchShipNavRequest | PatchShipNavRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PurchaseCargo201Response PurchaseCargo(ctx, shipSymbol).PurchaseCargoRequest(purchaseCargoRequest).Execute()
Purchase Cargo
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The ship's symbol.
purchaseCargoRequest := *openapiclient.NewPurchaseCargoRequest(openapiclient.TradeSymbol("PRECIOUS_STONES"), int32(123)) // PurchaseCargoRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.PurchaseCargo(context.Background(), shipSymbol).PurchaseCargoRequest(purchaseCargoRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.PurchaseCargo``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PurchaseCargo`: PurchaseCargo201Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.PurchaseCargo`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The ship's symbol. |
Other parameters are passed through a pointer to a apiPurchaseCargoRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
purchaseCargoRequest | PurchaseCargoRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PurchaseShip201Response PurchaseShip(ctx).PurchaseShipRequest(purchaseShipRequest).Execute()
Purchase Ship
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
purchaseShipRequest := *openapiclient.NewPurchaseShipRequest(openapiclient.ShipType("SHIP_PROBE"), "WaypointSymbol_example") // PurchaseShipRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.PurchaseShip(context.Background()).PurchaseShipRequest(purchaseShipRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.PurchaseShip``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PurchaseShip`: PurchaseShip201Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.PurchaseShip`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiPurchaseShipRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
purchaseShipRequest | PurchaseShipRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RefuelShip200Response RefuelShip(ctx, shipSymbol).RefuelShipRequest(refuelShipRequest).Execute()
Refuel Ship
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The ship symbol.
refuelShipRequest := *openapiclient.NewRefuelShipRequest() // RefuelShipRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.RefuelShip(context.Background(), shipSymbol).RefuelShipRequest(refuelShipRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.RefuelShip``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `RefuelShip`: RefuelShip200Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.RefuelShip`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The ship symbol. |
Other parameters are passed through a pointer to a apiRefuelShipRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
refuelShipRequest | RefuelShipRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RemoveMount201Response RemoveMount(ctx, shipSymbol).RemoveMountRequest(removeMountRequest).Execute()
Remove Mount
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The ship's symbol.
removeMountRequest := *openapiclient.NewRemoveMountRequest("Symbol_example") // RemoveMountRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.RemoveMount(context.Background(), shipSymbol).RemoveMountRequest(removeMountRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.RemoveMount``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `RemoveMount`: RemoveMount201Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.RemoveMount`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The ship's symbol. |
Other parameters are passed through a pointer to a apiRemoveMountRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
removeMountRequest | RemoveMountRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RepairShip200Response RepairShip(ctx, shipSymbol).Execute()
Repair Ship
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The ship symbol.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.RepairShip(context.Background(), shipSymbol).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.RepairShip``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `RepairShip`: RepairShip200Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.RepairShip`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The ship symbol. |
Other parameters are passed through a pointer to a apiRepairShipRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ScrapShip200Response ScrapShip(ctx, shipSymbol).Execute()
Scrap Ship
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The ship symbol.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.ScrapShip(context.Background(), shipSymbol).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.ScrapShip``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ScrapShip`: ScrapShip200Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.ScrapShip`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The ship symbol. |
Other parameters are passed through a pointer to a apiScrapShipRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SellCargo201Response SellCargo(ctx, shipSymbol).SellCargoRequest(sellCargoRequest).Execute()
Sell Cargo
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | Symbol of a ship.
sellCargoRequest := *openapiclient.NewSellCargoRequest(openapiclient.TradeSymbol("PRECIOUS_STONES"), int32(123)) // SellCargoRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.SellCargo(context.Background(), shipSymbol).SellCargoRequest(sellCargoRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.SellCargo``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SellCargo`: SellCargo201Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.SellCargo`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | Symbol of a ship. |
Other parameters are passed through a pointer to a apiSellCargoRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
sellCargoRequest | SellCargoRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ShipRefine201Response ShipRefine(ctx, shipSymbol).ShipRefineRequest(shipRefineRequest).Execute()
Ship Refine
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The symbol of the ship.
shipRefineRequest := *openapiclient.NewShipRefineRequest("Produce_example") // ShipRefineRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.ShipRefine(context.Background(), shipSymbol).ShipRefineRequest(shipRefineRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.ShipRefine``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ShipRefine`: ShipRefine201Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.ShipRefine`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The symbol of the ship. |
Other parameters are passed through a pointer to a apiShipRefineRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
shipRefineRequest | ShipRefineRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SiphonResources201Response SiphonResources(ctx, shipSymbol).Execute()
Siphon Resources
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The ship symbol.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.SiphonResources(context.Background(), shipSymbol).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.SiphonResources``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `SiphonResources`: SiphonResources201Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.SiphonResources`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The ship symbol. |
Other parameters are passed through a pointer to a apiSiphonResourcesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TransferCargo200Response TransferCargo(ctx, shipSymbol).TransferCargoRequest(transferCargoRequest).Execute()
Transfer Cargo
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The transferring ship's symbol.
transferCargoRequest := *openapiclient.NewTransferCargoRequest(openapiclient.TradeSymbol("PRECIOUS_STONES"), int32(123), "ShipSymbol_example") // TransferCargoRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.TransferCargo(context.Background(), shipSymbol).TransferCargoRequest(transferCargoRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.TransferCargo``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TransferCargo`: TransferCargo200Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.TransferCargo`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The transferring ship's symbol. |
Other parameters are passed through a pointer to a apiTransferCargoRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
transferCargoRequest | TransferCargoRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
WarpShip200Response WarpShip(ctx, shipSymbol).NavigateShipRequest(navigateShipRequest).Execute()
Warp Ship
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/nothub/spacetraders"
)
func main() {
shipSymbol := "shipSymbol_example" // string | The ship symbol.
navigateShipRequest := *openapiclient.NewNavigateShipRequest("WaypointSymbol_example") // NavigateShipRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FleetAPI.WarpShip(context.Background(), shipSymbol).NavigateShipRequest(navigateShipRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FleetAPI.WarpShip``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `WarpShip`: WarpShip200Response
fmt.Fprintf(os.Stdout, "Response from `FleetAPI.WarpShip`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
shipSymbol | string | The ship symbol. |
Other parameters are passed through a pointer to a apiWarpShipRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
navigateShipRequest | NavigateShipRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]