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": {
|
||||
"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.",
|
||||
"version": "2.0.2"
|
||||
"version": "3.0.3"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
|
|
@ -975,6 +975,77 @@
|
|||
"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": {
|
||||
"get": {
|
||||
"tags": [
|
||||
|
|
@ -5932,7 +6003,7 @@
|
|||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UserPropertyResponse"
|
||||
"$ref": "#/components/schemas/PropertyPropertyResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -11585,6 +11656,17 @@
|
|||
"rank"
|
||||
]
|
||||
},
|
||||
"TornOrganizedCrimePositionId": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"P1",
|
||||
"P2",
|
||||
"P3",
|
||||
"P4",
|
||||
"P5",
|
||||
"P6"
|
||||
]
|
||||
},
|
||||
"FactionTerritoryWarResultEnum": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
|
|
@ -11957,6 +12039,9 @@
|
|||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"UserLogId": {
|
||||
"type": "string"
|
||||
},
|
||||
"LogCategoryId": {
|
||||
"type": "integer",
|
||||
"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": {
|
||||
"required": [
|
||||
"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": {
|
||||
"allOf": [
|
||||
{
|
||||
|
|
@ -13559,6 +13740,7 @@
|
|||
{
|
||||
"required": [
|
||||
"status",
|
||||
"rented_by",
|
||||
"used_by",
|
||||
"cost",
|
||||
"cost_per_day",
|
||||
|
|
@ -13593,6 +13775,9 @@
|
|||
"rental_period_remaining": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"rented_by": {
|
||||
"$ref": "#/components/schemas/BasicUser"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
|
|
@ -13723,6 +13908,17 @@
|
|||
},
|
||||
"type": "object"
|
||||
},
|
||||
"PropertyPropertyResponse": {
|
||||
"required": [
|
||||
"property"
|
||||
],
|
||||
"properties": {
|
||||
"property": {
|
||||
"$ref": "#/components/schemas/UserPropertyDetailsExtendedWithRent"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"UserCurrentEducation": {
|
||||
"required": [
|
||||
"id",
|
||||
|
|
@ -20724,6 +20920,8 @@
|
|||
"FactionCrimeSlot": {
|
||||
"required": [
|
||||
"position",
|
||||
"position_id",
|
||||
"position_number",
|
||||
"item_requirement",
|
||||
"user",
|
||||
"checkpoint_pass_rate"
|
||||
|
|
@ -20732,6 +20930,13 @@
|
|||
"position": {
|
||||
"type": "string"
|
||||
},
|
||||
"position_id": {
|
||||
"$ref": "#/components/schemas/TornOrganizedCrimePositionId"
|
||||
},
|
||||
"position_number": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"item_requirement": {
|
||||
"description": "Details of item required for the slot, if applicable.",
|
||||
"oneOf": [
|
||||
|
|
@ -21888,6 +22093,24 @@
|
|||
},
|
||||
"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": {
|
||||
"required": [
|
||||
"info"
|
||||
|
|
@ -21896,7 +22119,8 @@
|
|||
"info": {
|
||||
"required": [
|
||||
"selections",
|
||||
"access"
|
||||
"access",
|
||||
"user"
|
||||
],
|
||||
"properties": {
|
||||
"selections": {
|
||||
|
|
@ -21969,12 +22193,48 @@
|
|||
},
|
||||
"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": {
|
||||
"required": [
|
||||
"level",
|
||||
"type",
|
||||
"faction",
|
||||
"company"
|
||||
"company",
|
||||
"log"
|
||||
],
|
||||
"properties": {
|
||||
"level": {
|
||||
|
|
@ -21988,6 +22248,8 @@
|
|||
"type": "boolean"
|
||||
},
|
||||
"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": [
|
||||
{
|
||||
"$ref": "#/components/schemas/FactionId"
|
||||
|
|
@ -22001,6 +22263,8 @@
|
|||
"type": "boolean"
|
||||
},
|
||||
"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": [
|
||||
{
|
||||
"$ref": "#/components/schemas/CompanyId"
|
||||
|
|
@ -22009,6 +22273,25 @@
|
|||
"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"
|
||||
|
|
@ -23476,7 +23759,7 @@
|
|||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"$ref": "#/components/schemas/TornOrganizedCrimePositionId"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
|
|
@ -23982,7 +24265,7 @@
|
|||
},
|
||||
"type": "object"
|
||||
},
|
||||
"TornHof": {
|
||||
"TornHofBasic": {
|
||||
"required": [
|
||||
"id",
|
||||
"username",
|
||||
|
|
@ -24056,6 +24339,35 @@
|
|||
},
|
||||
"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": {
|
||||
"required": [
|
||||
"hof",
|
||||
|
|
@ -25089,6 +25401,15 @@
|
|||
"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": {
|
||||
"name": "timestamp",
|
||||
"in": "query",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue