Merge pull request #64 from SpaceTradersAPI/feba/public-agent

Feba/public agent
This commit is contained in:
feba66 2023-07-12 23:57:42 +02:00 committed by GitHub
commit 37b7a029a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 119 additions and 2 deletions

View File

@ -5,7 +5,7 @@
"accountId": {
"type": "string",
"minLength": 1,
"description": "Account ID that is tied to this agent."
"description": "Account ID that is tied to this agent. Only included on your own agent."
},
"symbol": {
"type": "string",
@ -26,10 +26,13 @@
"type": "string",
"minLength": 1,
"description": "The faction the agent started with."
},
"shipCount": {
"type": "integer",
"description": "How many ships are owned by the agent."
}
},
"required": [
"accountId",
"symbol",
"headquarters",
"credits",

View File

@ -893,6 +893,120 @@
]
}
},
"/agents": {
"get": {
"description": "Fetch agents details.",
"operationId": "get-agents",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"data": {
"items": {
"$ref": "../models/Agent.json"
},
"type": "array"
},
"meta": {
"$ref": "../models/Meta.json"
}
},
"required": [
"data",
"meta"
],
"type": "object"
}
}
},
"description": "Successfully fetched agents details."
}
},
"summary": "List Agents",
"tags": [
"Agents"
],
"parameters": [
{
"schema": {
"type": "integer",
"minimum": 1,
"default": 1
},
"in": "query",
"name": "page",
"description": "What entry offset to request"
},
{
"schema": {
"type": "integer",
"minimum": 1,
"maximum": 20,
"default": 10
},
"in": "query",
"name": "limit",
"description": "How many entries to return per page"
}
],
"security": [
{},
{
"AgentToken": []
}
]
}
},
"/agents/{agentSymbol}": {
"get": {
"description": "Fetch agent details.",
"operationId": "get-agent",
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"properties": {
"data": {
"$ref": "../models/Agent.json"
}
},
"required": [
"data"
],
"type": "object"
}
}
},
"description": "Successfully fetched agent details."
}
},
"summary": "Get Public Agent",
"tags": [
"Agents"
],
"parameters": [
{
"description": "The agent symbol",
"in": "path",
"name": "agentSymbol",
"required": true,
"schema": {
"default": "FEBA66",
"type": "string"
}
}
],
"security": [
{},
{
"AgentToken": []
}
]
}
},
"/my/contracts": {
"get": {
"description": "Return a paginated list of all your contracts.",