add gas siphon endpoint

This commit is contained in:
SpaceAdmiral 2023-10-23 16:33:13 -07:00
parent 4ad551ad28
commit 407fbf8524
4 changed files with 101 additions and 0 deletions

19
models/Siphon.json Normal file
View File

@ -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"
]
}

18
models/SiphonYield.json Normal file
View File

@ -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"
]
}

View File

@ -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",

View File

@ -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": [
{