chore: updated openapi.json
This commit is contained in:
parent
ac0cde0ad2
commit
943c9993f7
1 changed files with 327 additions and 6 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
"info": {
|
"info": {
|
||||||
"title": "Torn API",
|
"title": "Torn API",
|
||||||
"description": "\n * The development of Torn's API v2 is still ongoing.\n * If selections remain unaltered, they will default to the API v1 version.\n * Unlike API v1, API v2 accepts both selections and IDs as path and query parameters.\n * If any discrepancies or errors are found, please submit a [bug report](https://www.torn.com/forums.php#/p=forums&f=19&b=0&a=0) on the Torn Forums.\n * In case you're using bots to check for changes on openapi.json file, make sure to specificy a custom user-agent header - CloudFlare sometimes prevents requests from default user-agents.",
|
"description": "\n * The development of Torn's API v2 is still ongoing.\n * If selections remain unaltered, they will default to the API v1 version.\n * Unlike API v1, API v2 accepts both selections and IDs as path and query parameters.\n * If any discrepancies or errors are found, please submit a [bug report](https://www.torn.com/forums.php#/p=forums&f=19&b=0&a=0) on the Torn Forums.\n * In case you're using bots to check for changes on openapi.json file, make sure to specificy a custom user-agent header - CloudFlare sometimes prevents requests from default user-agents.",
|
||||||
"version": "2.0.2"
|
"version": "3.0.3"
|
||||||
},
|
},
|
||||||
"servers": [
|
"servers": [
|
||||||
{
|
{
|
||||||
|
|
@ -975,6 +975,77 @@
|
||||||
"x-stability": "Stable"
|
"x-stability": "Stable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/user/log": {
|
||||||
|
"get": {
|
||||||
|
"tags": [
|
||||||
|
"User"
|
||||||
|
],
|
||||||
|
"summary": "Get your logs",
|
||||||
|
"description": "Requires limited access key. <br> It's possible to pass a list of log ids or a log category id.<br>",
|
||||||
|
"operationId": "f354f40bc5d6cbadf57fdecb453c976f",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"name": "log",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Log ids, comma separated, e.g. 105,4900,4905",
|
||||||
|
"required": false,
|
||||||
|
"style": "form",
|
||||||
|
"explode": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/LogId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "cat",
|
||||||
|
"in": "query",
|
||||||
|
"description": "Log category id",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/LogCategoryId"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/parameters/ApiLimit100Default20"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/parameters/ApiTo"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/parameters/ApiFrom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/parameters/ApiTimestamp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/parameters/ApiComment"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/parameters/ApiKeyFull"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "Successful operation",
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/components/schemas/UserLogsResponse"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"api_key": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"x-stability": "Unstable"
|
||||||
|
}
|
||||||
|
},
|
||||||
"/user/organizedcrime": {
|
"/user/organizedcrime": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": [
|
||||||
|
|
@ -5932,7 +6003,7 @@
|
||||||
"content": {
|
"content": {
|
||||||
"application/json": {
|
"application/json": {
|
||||||
"schema": {
|
"schema": {
|
||||||
"$ref": "#/components/schemas/UserPropertyResponse"
|
"$ref": "#/components/schemas/PropertyPropertyResponse"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -11585,6 +11656,17 @@
|
||||||
"rank"
|
"rank"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"TornOrganizedCrimePositionId": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"P1",
|
||||||
|
"P2",
|
||||||
|
"P3",
|
||||||
|
"P4",
|
||||||
|
"P5",
|
||||||
|
"P6"
|
||||||
|
]
|
||||||
|
},
|
||||||
"FactionTerritoryWarResultEnum": {
|
"FactionTerritoryWarResultEnum": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": [
|
||||||
|
|
@ -11957,6 +12039,9 @@
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"format": "int32"
|
"format": "int32"
|
||||||
},
|
},
|
||||||
|
"UserLogId": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"LogCategoryId": {
|
"LogCategoryId": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"format": "int32"
|
"format": "int32"
|
||||||
|
|
@ -13412,6 +13497,70 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"UserLog": {
|
||||||
|
"required": [
|
||||||
|
"id",
|
||||||
|
"timestamp",
|
||||||
|
"details",
|
||||||
|
"data",
|
||||||
|
"params"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"$ref": "#/components/schemas/UserLogId"
|
||||||
|
},
|
||||||
|
"timestamp": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int32"
|
||||||
|
},
|
||||||
|
"details": {
|
||||||
|
"required": [
|
||||||
|
"id",
|
||||||
|
"title",
|
||||||
|
"category"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"$ref": "#/components/schemas/LogId"
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"category": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"data": {
|
||||||
|
"description": "Dynamic key-value pairs related to the log.",
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"params": {
|
||||||
|
"description": "Dynamic key-value pairs related to the log.",
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"UserLogsResponse": {
|
||||||
|
"required": [
|
||||||
|
"log",
|
||||||
|
"_metadata"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"log": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/UserLog"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"_metadata": {
|
||||||
|
"$ref": "#/components/schemas/RequestMetadataWithLinks"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"BasicUser": {
|
"BasicUser": {
|
||||||
"required": [
|
"required": [
|
||||||
"id",
|
"id",
|
||||||
|
|
@ -13530,6 +13679,38 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"UserPropertyDetailsExtendedWithRent": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/UserPropertyBasicDetails"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"required": [
|
||||||
|
"status",
|
||||||
|
"used_by"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"used_by": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/BasicUser"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"none",
|
||||||
|
"in_use"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"rented_by": {
|
||||||
|
"$ref": "#/components/schemas/BasicUser"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"UserPropertyDetails": {
|
"UserPropertyDetails": {
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{
|
{
|
||||||
|
|
@ -13559,6 +13740,7 @@
|
||||||
{
|
{
|
||||||
"required": [
|
"required": [
|
||||||
"status",
|
"status",
|
||||||
|
"rented_by",
|
||||||
"used_by",
|
"used_by",
|
||||||
"cost",
|
"cost",
|
||||||
"cost_per_day",
|
"cost_per_day",
|
||||||
|
|
@ -13593,6 +13775,9 @@
|
||||||
"rental_period_remaining": {
|
"rental_period_remaining": {
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"format": "int32"
|
"format": "int32"
|
||||||
|
},
|
||||||
|
"rented_by": {
|
||||||
|
"$ref": "#/components/schemas/BasicUser"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
|
|
@ -13723,6 +13908,17 @@
|
||||||
},
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"PropertyPropertyResponse": {
|
||||||
|
"required": [
|
||||||
|
"property"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"property": {
|
||||||
|
"$ref": "#/components/schemas/UserPropertyDetailsExtendedWithRent"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"UserCurrentEducation": {
|
"UserCurrentEducation": {
|
||||||
"required": [
|
"required": [
|
||||||
"id",
|
"id",
|
||||||
|
|
@ -20724,6 +20920,8 @@
|
||||||
"FactionCrimeSlot": {
|
"FactionCrimeSlot": {
|
||||||
"required": [
|
"required": [
|
||||||
"position",
|
"position",
|
||||||
|
"position_id",
|
||||||
|
"position_number",
|
||||||
"item_requirement",
|
"item_requirement",
|
||||||
"user",
|
"user",
|
||||||
"checkpoint_pass_rate"
|
"checkpoint_pass_rate"
|
||||||
|
|
@ -20732,6 +20930,13 @@
|
||||||
"position": {
|
"position": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"position_id": {
|
||||||
|
"$ref": "#/components/schemas/TornOrganizedCrimePositionId"
|
||||||
|
},
|
||||||
|
"position_number": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int32"
|
||||||
|
},
|
||||||
"item_requirement": {
|
"item_requirement": {
|
||||||
"description": "Details of item required for the slot, if applicable.",
|
"description": "Details of item required for the slot, if applicable.",
|
||||||
"oneOf": [
|
"oneOf": [
|
||||||
|
|
@ -21888,6 +22093,24 @@
|
||||||
},
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"KeyInfoAvailableLog": {
|
||||||
|
"required": [
|
||||||
|
"category_id",
|
||||||
|
"log_ids"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"category_id": {
|
||||||
|
"$ref": "#/components/schemas/LogCategoryId"
|
||||||
|
},
|
||||||
|
"log_ids": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/LogId"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"KeyInfoResponse": {
|
"KeyInfoResponse": {
|
||||||
"required": [
|
"required": [
|
||||||
"info"
|
"info"
|
||||||
|
|
@ -21896,7 +22119,8 @@
|
||||||
"info": {
|
"info": {
|
||||||
"required": [
|
"required": [
|
||||||
"selections",
|
"selections",
|
||||||
"access"
|
"access",
|
||||||
|
"user"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"selections": {
|
"selections": {
|
||||||
|
|
@ -21969,12 +22193,48 @@
|
||||||
},
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"user": {
|
||||||
|
"required": [
|
||||||
|
"id",
|
||||||
|
"faction_id",
|
||||||
|
"company_id"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"faction_id": {
|
||||||
|
"description": "Null only if the user is not in a faction.",
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/FactionId"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"company_id": {
|
||||||
|
"description": "Null only if the user is not in a company.",
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/CompanyId"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "null"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"$ref": "#/components/schemas/UserId"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"access": {
|
"access": {
|
||||||
"required": [
|
"required": [
|
||||||
"level",
|
"level",
|
||||||
"type",
|
"type",
|
||||||
"faction",
|
"faction",
|
||||||
"company"
|
"company",
|
||||||
|
"log"
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"level": {
|
"level": {
|
||||||
|
|
@ -21988,6 +22248,8 @@
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"faction_id": {
|
"faction_id": {
|
||||||
|
"description": "This field is replaced with 'user'.'faction_id' field and will be removed on 1st of September 2025. Populated only if 'faction' field is true.",
|
||||||
|
"deprecated": true,
|
||||||
"oneOf": [
|
"oneOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/FactionId"
|
"$ref": "#/components/schemas/FactionId"
|
||||||
|
|
@ -22001,6 +22263,8 @@
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
},
|
},
|
||||||
"company_id": {
|
"company_id": {
|
||||||
|
"description": "This field is replaced with 'user'.'company_id' field and will be removed on 1st of September 2025. Populated only if 'company' field is true.",
|
||||||
|
"deprecated": true,
|
||||||
"oneOf": [
|
"oneOf": [
|
||||||
{
|
{
|
||||||
"$ref": "#/components/schemas/CompanyId"
|
"$ref": "#/components/schemas/CompanyId"
|
||||||
|
|
@ -22009,6 +22273,25 @@
|
||||||
"type": "null"
|
"type": "null"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
"log": {
|
||||||
|
"required": [
|
||||||
|
"custom_permissions",
|
||||||
|
"available"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"custom_permissions": {
|
||||||
|
"description": "Shows if key has custom log permissions enabled.",
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"available": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/components/schemas/KeyInfoAvailableLog"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
|
|
@ -23476,7 +23759,7 @@
|
||||||
],
|
],
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"id": {
|
||||||
"type": "string"
|
"$ref": "#/components/schemas/TornOrganizedCrimePositionId"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
|
@ -23982,7 +24265,7 @@
|
||||||
},
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
"TornHof": {
|
"TornHofBasic": {
|
||||||
"required": [
|
"required": [
|
||||||
"id",
|
"id",
|
||||||
"username",
|
"username",
|
||||||
|
|
@ -24056,6 +24339,35 @@
|
||||||
},
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"TornHofWithOffenses": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/TornHofBasic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"required": [
|
||||||
|
"criminal_offenses"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"criminal_offenses": {
|
||||||
|
"type": "integer",
|
||||||
|
"format": "int32"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"TornHof": {
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/TornHofBasic"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/TornHofWithOffenses"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"TornHofResponse": {
|
"TornHofResponse": {
|
||||||
"required": [
|
"required": [
|
||||||
"hof",
|
"hof",
|
||||||
|
|
@ -25089,6 +25401,15 @@
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ApiKeyFull": {
|
||||||
|
"name": "key",
|
||||||
|
"in": "query",
|
||||||
|
"description": "API key (Full).<br>It's not required to use this parameter when passing the API key via the Authorization header.",
|
||||||
|
"required": false,
|
||||||
|
"schema": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
"ApiTimestamp": {
|
"ApiTimestamp": {
|
||||||
"name": "timestamp",
|
"name": "timestamp",
|
||||||
"in": "query",
|
"in": "query",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue