-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
1,196 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# GET /Api/CS2Interface/{botNames}/Start | ||
|
||
## Description | ||
|
||
Starts the CS2 interface for the given `botNames` | ||
|
||
> [!NOTE] | ||
> This request will run until the interface successfully starts or it encounters an error. If attempting to start the interface for a bot that already has the interface running, nothing will happen. | ||
## Path Parameters | ||
|
||
Name | Required | Description | ||
--- | --- | --- | ||
`botNames` | Yes | One or more ASF [bot names](https://github.com/JustArchiNET/ArchiSteamFarm/wiki/Commands#bots-argument) | ||
|
||
## Query Parameters | ||
|
||
None | ||
|
||
## Response Result | ||
|
||
Property | Type | Description | ||
--- | --- | --- | ||
`botName.Message` | `string` | A description of whatever just happened to `botName` | ||
`botName.Success` | `bool` | True if the interface is now running for `botName` | ||
|
||
## Example Response | ||
|
||
``` | ||
http://127.0.0.1:1242/Api/CS2Interface/Bot1/Start | ||
``` | ||
|
||
```json | ||
{ | ||
"Message": "OK", | ||
"Success": true, | ||
"Result": { | ||
"Bot1": { | ||
"Message": "CS2 Interface started", | ||
"Success": true | ||
} | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# GET /Api/CS2Interface/{botNames}/Stop | ||
|
||
## Description | ||
|
||
Stops the CS2 interface for the given `botNames` | ||
|
||
## Path Parameters | ||
|
||
Name | Required | Description | ||
--- | --- | --- | ||
`botNames` | Yes | One or more ASF [bot names](https://github.com/JustArchiNET/ArchiSteamFarm/wiki/Commands#bots-argument) | ||
|
||
## Query Parameters | ||
|
||
None | ||
|
||
## Response Result | ||
|
||
Property | Type | Description | ||
--- | --- | --- | ||
`botName.Message` | `string` | A description of whatever just happened to `botName` | ||
`botName.Success` | `bool` | True if the interface is now not running for `botName` | ||
|
||
## Example Response | ||
|
||
``` | ||
http://127.0.0.1:1242/Api/CS2Interface/Bot1/Stop | ||
``` | ||
|
||
```json | ||
{ | ||
"Message": "OK", | ||
"Success": true, | ||
"Result": { | ||
"Bot1": { | ||
"Message": "CS2 Interface successfully stopped", | ||
"Success": true | ||
} | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# GET /Api/CS2Interface/{botName}/CraftItem/{recipeID} | ||
|
||
## Description | ||
|
||
Crafts an item for the given `botName` using the specified crafting `recipeID` | ||
|
||
## Path Parameters | ||
|
||
Name | Required | Description | ||
--- | --- | --- | ||
`botName` | Yes | The ASF bot name that will be used to craft an item | ||
`recipeID` | Yes | The ID for the crafting recipe | ||
|
||
## Query Parameters | ||
|
||
Name | Required | Description | ||
--- | --- | --- | ||
`itemIDs` | Yes | A comma separated list of item IDs to be used in the crafting recipe | ||
|
||
## Response Result | ||
|
||
Property | Type | Description | ||
--- | --- | --- | ||
`recipe` | `ushort` | Should be the same as `recipeID` | ||
`unknown` | `uint` | Unknown | ||
`itemcount` | `ushort` | The number of items created | ||
`itemids` | `array<ulong>` | The item IDs for each of the newly created items | ||
|
||
> [!NOTE] | ||
> Details for the newly crafted items can be found using the [Inventory](/CS2Interface/IPC/Documentation/Items/Inventory.md) API | ||
## Example Response | ||
|
||
``` | ||
http://127.0.0.1:1242/Api/CS2Interface/Bot1/CraftItem/0?itemIDs=41112241128,41112243329,41112241214,41112246101,41112244630,41112248299,41112243430,41112247282,41112248426,41112244626 | ||
``` | ||
|
||
```javascript | ||
{ | ||
"Message": "OK", | ||
"Success": true, | ||
"Result": { | ||
"recipe": 0, | ||
"unknown": 0, | ||
"itemcount": 1, | ||
"itemids": [ | ||
41112277716 | ||
] | ||
} | ||
} | ||
``` |
183 changes: 183 additions & 0 deletions
183
CS2Interface/IPC/Documentation/Items/GetCrateContents.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,183 @@ | ||
# GET /Api/CS2Interface/{botName}/GetCrateContents/{crateID} | ||
|
||
## Description | ||
|
||
Get the contents of storage unit `crateID` owned by the given `botName` | ||
|
||
## Path Parameters | ||
|
||
Name | Required | Description | ||
--- | --- | --- | ||
`botName` | Yes | The ASF bot name for the owner of the storage unit | ||
`crateID` | Yes | The storage unit's item ID | ||
|
||
## Query Parameters | ||
|
||
Name | Required | Description | ||
--- | --- | --- | ||
`minimal` | No | If set to true, the response will only contain the data recieved from CS2 | ||
`showDefs` | No | If set to true, the response will include a `defs` property containing additional game data | ||
|
||
## Response Result | ||
|
||
Property | Type | Description | ||
--- | --- | --- | ||
`iteminfo` | `object` | The raw item info recieved from CS2. The details of this object are defined by [`CSOEconItem`](https://github.com/SteamDatabase/Protobufs/blob/master/csgo/base_gcmessages.proto) | ||
`attributes` | `object` | Item attributes which will vary depending on the item. The type for these attribute's values will depend on the attribute, and can be any of: `string`, `float`, or `uint` | ||
`casket_id` | `ulong` | The item ID for the storage unit this item is currently in | ||
`moveable` | `bool` | True if this item can be placed into a storage unit | ||
`full_name` | `string` | The item's name (as it would appear in the url of the item's Steam Marketplace listing page) | ||
`full_type_name` | `string` | The item's type (as it would appear on the Steam Marketplace) | ||
`rarity_name` | `string` | The item's rarity | ||
`quality_name` | `string` | The item's quality | ||
`origin_name` | `string` | How the item was obtained | ||
`type_name` | `string` | The item's type | ||
`item_name` | `string` | The item's name | ||
`tool_name` | `string` | What type of tool this is (usually the same as `type_name`, except for Sealed Graffiti) | ||
`tint_name` | `string` | The item's tint | ||
`weapon_image_url` | `string` | An image of the item (if one exists in [items_game_cdn.txt](https://raw.githubusercontent.com/SteamDatabase/GameTracking-CS2/master/game/csgo/pak01_dir/scripts/items/items_game_cdn.txt)) | ||
`weapon_name` | `string` | The weapon this applies to | ||
`wear_name` | `string` | The name for the float range this item falls into | ||
`wear` | `float` | The item's float value | ||
`wear_min` | `float` | The item's minimum possible float | ||
`wear_max` | `float` | The item's maximum possible float | ||
`name_id` | `string` | The unique string ID for this kind of item | ||
`set_name_id` | `string` | The unique string ID for the collection this item belongs to | ||
`set_name` | `string` | The name of the collection this item belongs to | ||
`crate_name_id` | `string` | The unique string ID for the crate this item can be found in | ||
`crate_defindex` | `uint` | The definition index for the crate this item can be found in (the definition for which can be found in [items_game.txt](https://raw.githubusercontent.com/SteamDatabase/GameTracking-CS2/master/game/csgo/pak01_dir/scripts/items/items_game.txt) under `items`) | ||
`crate_name` | `string` | The name of the crate this item can be found in | ||
`defs.item_def` | `object` | Related game data found in [items_game.txt](https://raw.githubusercontent.com/SteamDatabase/GameTracking-CS2/master/game/csgo/pak01_dir/scripts/items/items_game.txt) under `items` | ||
`defs.paint_kit_def` | `object` | Related game data found in [items_game.txt](https://raw.githubusercontent.com/SteamDatabase/GameTracking-CS2/master/game/csgo/pak01_dir/scripts/items/items_game.txt) under `paint_kits` | ||
`defs.sticker_kit_def` | `object` | Related game data found in [items_game.txt](https://raw.githubusercontent.com/SteamDatabase/GameTracking-CS2/master/game/csgo/pak01_dir/scripts/items/items_game.txt) under `sticker_kits` | ||
`defs.music_def` | `object` | Related game data found in [items_game.txt](https://raw.githubusercontent.com/SteamDatabase/GameTracking-CS2/master/game/csgo/pak01_dir/scripts/items/items_game.txt) under `music_definitions` | ||
`defs.keychain_def` | `object` | Related game data found in [items_game.txt](https://raw.githubusercontent.com/SteamDatabase/GameTracking-CS2/master/game/csgo/pak01_dir/scripts/items/items_game.txt) under `keychain_definitions` | ||
|
||
## Example Response | ||
|
||
``` | ||
http://127.0.0.1:1242/Api/CS2Interface/Bot1/GetCrateContents/31555237276 | ||
``` | ||
|
||
```json | ||
{ | ||
"Message": "OK", | ||
"Success": true, | ||
"Result": [ | ||
{ | ||
"iteminfo": { | ||
"id": 41020250307, | ||
"account_id": 84122798, | ||
"inventory": 3221225475, | ||
"def_index": 4818, | ||
"quantity": 1, | ||
"level": 1, | ||
"quality": 4, | ||
"flags": 0, | ||
"origin": 24, | ||
"attribute": [ | ||
{ | ||
"def_index": 75, | ||
"value_bytes": "APZ0Zw==" | ||
}, | ||
{ | ||
"def_index": 272, | ||
"value_bytes": "nLXWWA==" | ||
}, | ||
{ | ||
"def_index": 273, | ||
"value_bytes": "BwAAAA==" | ||
} | ||
], | ||
"interior_item": null, | ||
"in_use": false, | ||
"equipped_state": [], | ||
"rarity": 1 | ||
}, | ||
"attributes": { | ||
"tradable after date": 1735718400, | ||
"casket item id low": 1490466204, | ||
"casket item id high": 7 | ||
}, | ||
"casket_id": 31555237276, | ||
"moveable": true, | ||
"full_name": "Dreams & Nightmares Case", | ||
"full_type_name": "Base Grade Container", | ||
"rarity_name": "Base Grade", | ||
"quality_name": "Unique", | ||
"origin_name": "Level Up Reward", | ||
"type_name": "Container", | ||
"item_name": "Dreams & Nightmares Case", | ||
"name_id": "crate_community_30" | ||
}, | ||
{ | ||
"iteminfo": { | ||
"id": 41005308811, | ||
"account_id": 84122798, | ||
"inventory": 3221225475, | ||
"def_index": 36, | ||
"quantity": 1, | ||
"level": 1, | ||
"quality": 4, | ||
"flags": 0, | ||
"origin": 23, | ||
"attribute": [ | ||
{ | ||
"def_index": 6, | ||
"value_bytes": "AIBBRA==" | ||
}, | ||
{ | ||
"def_index": 7, | ||
"value_bytes": "DLIGQw==" | ||
}, | ||
{ | ||
"def_index": 8, | ||
"value_bytes": "SMWOPQ==" | ||
}, | ||
{ | ||
"def_index": 75, | ||
"value_bytes": "gKRzZw==" | ||
}, | ||
{ | ||
"def_index": 272, | ||
"value_bytes": "nLXWWA==" | ||
}, | ||
{ | ||
"def_index": 273, | ||
"value_bytes": "BwAAAA==" | ||
} | ||
], | ||
"interior_item": null, | ||
"in_use": false, | ||
"equipped_state": [], | ||
"rarity": 3 | ||
}, | ||
"attributes": { | ||
"set item texture prefab": 774, | ||
"set item texture seed": 131.4292, | ||
"set item texture wear": 0.06968424, | ||
"tradable after date": 1735632000, | ||
"casket item id low": 1490466204, | ||
"casket item id high": 7 | ||
}, | ||
"casket_id": 31555237276, | ||
"moveable": true, | ||
"full_name": "P250 | Small Game (Factory New)", | ||
"full_type_name": "Mil-Spec Grade Pistol", | ||
"rarity_name": "Mil-Spec Grade", | ||
"quality_name": "Unique", | ||
"origin_name": "Quest Reward", | ||
"type_name": "Pistol", | ||
"item_name": "Small Game", | ||
"weapon_name": "P250", | ||
"wear_name": "Factory New", | ||
"wear": 0.069684237241745, | ||
"wear_min": 0, | ||
"wear_max": 0.7, | ||
"name_id": "[soch_hunter_blaze_p250]weapon_p250", | ||
"set_name_id": "set_realism_camo", | ||
"set_name": "The Sport & Field Collection" | ||
} | ||
] | ||
} | ||
``` |
Oops, something went wrong.