diff --git a/Cargo.lock b/Cargo.lock index 7ad3fe1..dbc87a5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2294,7 +2294,7 @@ dependencies = [ [[package]] name = "torn-api" -version = "1.7.2" +version = "1.7.3" dependencies = [ "bon", "bytes", diff --git a/torn-api/Cargo.toml b/torn-api/Cargo.toml index 2311d27..5b88128 100644 --- a/torn-api/Cargo.toml +++ b/torn-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "torn-api" -version = "1.7.2" +version = "1.7.3" edition = "2021" description = "Auto-generated bindings for the v2 torn api" license = { workspace = true } @@ -43,7 +43,7 @@ strum = { version = "0.27.1", features = ["derive"], optional = true } tokio = { version = "1", features = ["full"] } [build-dependencies] -torn-api-codegen = { path = "../torn-api-codegen", version = "0.7.0" } +torn-api-codegen = { path = "../torn-api-codegen", version = "0.7.3" } syn = { workspace = true, features = ["parsing"] } proc-macro2 = { workspace = true } prettyplease = "0.2" diff --git a/torn-api/openapi.json b/torn-api/openapi.json index d1535bd..ac1e306 100644 --- a/torn-api/openapi.json +++ b/torn-api/openapi.json @@ -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": "3.0.3" + "version": "3.0.5" }, "servers": [ { @@ -21,6 +21,19 @@ "description": "Requires limited access key.
", "operationId": "3acc98a3016974b786cb01e04e1ced04", "parameters": [ + { + "name": "filters", + "in": "query", + "description": "It's possible to use this query parameter to only get incoming or outgoing attacks. If not specified, this selection will return both incoming and outgoing attacks.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "incoming", + "outgoing" + ] + } + }, { "$ref": "#/components/parameters/ApiLimit100" }, @@ -72,6 +85,19 @@ "description": "Requires limited access key.
Returns up to 1,000 rows.
", "operationId": "e995691fd9845c8b4a91f065ac9c8420", "parameters": [ + { + "name": "filters", + "in": "query", + "description": "It's possible to use this query parameter to only get incoming or outgoing attacks. If not specified, this selection will return both incoming and outgoing attacks.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "incoming", + "outgoing" + ] + } + }, { "$ref": "#/components/parameters/ApiLimit1000" }, @@ -1589,6 +1615,19 @@ "description": "Requires limited access key.
", "operationId": "3c847eb1325040798f37a7492108e094", "parameters": [ + { + "name": "filters", + "in": "query", + "description": "It's possible to use this query parameter to only get incoming or outgoing revives. If not specified, this selection will return both incoming and outgoing revives.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "incoming", + "outgoing" + ] + } + }, { "$ref": "#/components/parameters/ApiLimit100Default20" }, @@ -1643,6 +1682,19 @@ "description": "Requires limited access key.
", "operationId": "8820cd889afde899353037ca5a0f9a07", "parameters": [ + { + "name": "filters", + "in": "query", + "description": "It's possible to use this query parameter to only get incoming or outgoing revives. If not specified, this selection will return both incoming and outgoing revives.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "incoming", + "outgoing" + ] + } + }, { "$ref": "#/components/parameters/ApiLimit1000Default20" }, @@ -2019,6 +2071,19 @@ "description": "Requires limited access key with faction API access permissions.
", "operationId": "cb5b38ba64c389e706526df8bc8af9b6", "parameters": [ + { + "name": "filters", + "in": "query", + "description": "It's possible to use this query parameter to only get incoming or outgoing attacks. If not specified, this selection will return both incoming and outgoing attacks.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "incoming", + "outgoing" + ] + } + }, { "$ref": "#/components/parameters/ApiLimit100" }, @@ -2070,6 +2135,19 @@ "description": "Requires limited access key with faction API access permissions.
", "operationId": "8551280aaaf9819aa94be5c469a523de", "parameters": [ + { + "name": "filters", + "in": "query", + "description": "It's possible to use this query parameter to only get incoming or outgoing attacks. If not specified, this selection will return both incoming and outgoing attacks.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "incoming", + "outgoing" + ] + } + }, { "$ref": "#/components/parameters/ApiLimit1000" }, @@ -3408,6 +3486,19 @@ "description": "Requires limited access key with faction API access permissions.
", "operationId": "486fcda26ed1aa6aba8ec7091080723b", "parameters": [ + { + "name": "filters", + "in": "query", + "description": "It's possible to use this query parameter to only get incoming or outgoing revives. If not specified, this selection will return both incoming and outgoing revives.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "incoming", + "outgoing" + ] + } + }, { "$ref": "#/components/parameters/ApiLimit100" }, @@ -3462,6 +3553,19 @@ "description": "Requires limited access key with faction API access permissions.
", "operationId": "f17a4064779e8de5200238816c233c02", "parameters": [ + { + "name": "filters", + "in": "query", + "description": "It's possible to use this query parameter to only get incoming or outgoing revives. If not specified, this selection will return both incoming and outgoing revives.", + "required": false, + "schema": { + "type": "string", + "enum": [ + "incoming", + "outgoing" + ] + } + }, { "$ref": "#/components/parameters/ApiLimit1000" }, @@ -11968,6 +12072,20 @@ "Hospitalized" ] }, + "FactionCrimeUserItemOutcomeEnum": { + "type": "string", + "enum": [ + "user", + "faction" + ] + }, + "FactionCrimeItemOutcomeEnum": { + "type": "string", + "enum": [ + "lost", + "used" + ] + }, "RaceId": { "type": "integer", "format": "int32" @@ -20799,12 +20917,36 @@ }, "type": "object" }, + "FactionCrimeUserItemOutcome": { + "required": [ + "owned_by", + "item_id", + "item_uid", + "outcome" + ], + "properties": { + "owned_by": { + "$ref": "#/components/schemas/FactionCrimeUserItemOutcomeEnum" + }, + "item_id": { + "$ref": "#/components/schemas/ItemId" + }, + "item_uid": { + "$ref": "#/components/schemas/ItemUid" + }, + "outcome": { + "$ref": "#/components/schemas/FactionCrimeItemOutcomeEnum" + } + }, + "type": "object" + }, "FactionCrimeUser": { "required": [ "id", "outcome", "joined_at", - "progress" + "progress", + "item_outcome" ], "properties": { "id": { @@ -20821,6 +20963,29 @@ } ] }, + "outcome_duration": { + "description": "This field is only populated for crimes completed after 25/07/2025 and only if the outcome is 'Jailed' or 'Hospitalized'.", + "oneOf": [ + { + "type": "integer", + "format": "int32" + }, + { + "type": "null" + } + ] + }, + "item_outcome": { + "description": "This field is only populated for crimes completed after 25/07/2025 and only if the item was used or lost.", + "oneOf": [ + { + "$ref": "#/components/schemas/FactionCrimeUserItemOutcome" + }, + { + "type": "null" + } + ] + }, "joined_at": { "description": "The timestamp at which the user joined the slot.", "type": "integer",