From 407fbf852480cc4acb4fd5107b7234daaac660ba Mon Sep 17 00:00:00 2001 From: SpaceAdmiral Date: Mon, 23 Oct 2023 16:33:13 -0700 Subject: [PATCH] add gas siphon endpoint --- models/Siphon.json | 19 +++++++++++ models/SiphonYield.json | 18 +++++++++++ models/TradeSymbol.json | 1 + reference/SpaceTraders.json | 63 +++++++++++++++++++++++++++++++++++++ 4 files changed, 101 insertions(+) create mode 100644 models/Siphon.json create mode 100644 models/SiphonYield.json diff --git a/models/Siphon.json b/models/Siphon.json new file mode 100644 index 0000000..ecfc693 --- /dev/null +++ b/models/Siphon.json @@ -0,0 +1,19 @@ +{ + "description": "Siphon details.", + "type": "object", + "properties": { + "shipSymbol": { + "type": "string", + "minLength": 1, + "description": "Symbol of the ship that executed the siphon." + }, + "yield": { + "$ref": "./SiphonYield.json", + "description": "Yields from the siphon operation." + } + }, + "required": [ + "shipSymbol", + "yield" + ] +} \ No newline at end of file diff --git a/models/SiphonYield.json b/models/SiphonYield.json new file mode 100644 index 0000000..6a126d2 --- /dev/null +++ b/models/SiphonYield.json @@ -0,0 +1,18 @@ +{ + "type": "object", + "description": "A yield from the siphon operation.", + "properties": { + "symbol": { + "$ref": "./TradeSymbol.json", + "description": "Symbol of the good that was siphoned." + }, + "units": { + "type": "integer", + "description": "The number of units siphoned that were placed into the ship's cargo hold." + } + }, + "required": [ + "symbol", + "units" + ] +} \ No newline at end of file diff --git a/models/TradeSymbol.json b/models/TradeSymbol.json index 9fd06e3..b7d24c7 100644 --- a/models/TradeSymbol.json +++ b/models/TradeSymbol.json @@ -82,6 +82,7 @@ "ENGINE_ION_DRIVE_II", "ENGINE_HYPER_DRIVE_I", "MODULE_MINERAL_PROCESSOR_I", + "MODULE_GAS_PROCESSOR_I", "MODULE_CARGO_HOLD_I", "MODULE_CREW_QUARTERS_I", "MODULE_ENVOY_QUARTERS_I", diff --git a/reference/SpaceTraders.json b/reference/SpaceTraders.json index b83bb8a..8013b39 100644 --- a/reference/SpaceTraders.json +++ b/reference/SpaceTraders.json @@ -2182,6 +2182,69 @@ ] } }, + "/my/ships/{shipSymbol}/siphon": { + "parameters": [ + { + "description": "The ship symbol.", + "in": "path", + "name": "shipSymbol", + "required": true, + "schema": { + "type": "string" + } + } + ], + "post": { + "description": "Siphon gases, such as hydrocarbon, from gas giants.\n\nThe ship must be in orbit to be able to siphon and must have siphon mounts and a gas processor installed.", + "operationId": "siphon-resources", + "responses": { + "201": { + "content": { + "application/json": { + "schema": { + "description": "", + "properties": { + "data": { + "properties": { + "cooldown": { + "$ref": "../models/Cooldown.json" + }, + "siphon": { + "$ref": "../models/Siphon.json" + }, + "cargo": { + "$ref": "../models/ShipCargo.json" + } + }, + "required": [ + "siphon", + "cooldown", + "cargo" + ], + "type": "object" + } + }, + "required": [ + "data" + ], + "type": "object" + } + } + }, + "description": "Siphon successful." + } + }, + "security": [ + { + "AgentToken": [] + } + ], + "summary": "Siphon Resources", + "tags": [ + "Fleet" + ] + } + }, "/my/ships/{shipSymbol}/extract/survey": { "parameters": [ {