{"openapi":"3.1.0","info":{"title":"v1","version":"1"},"servers":[{"url":"https://unbelievaboat.com/api/v1"}],"components":{"securitySchemes":{"sec0":{"type":"apiKey","in":"header","name":"Authorization","x-default":""}}},"security":[{"sec0":[]}],"paths":{"/guilds/{guild_id}/users/{user_id}":{"get":{"summary":"Get Balance","description":"","operationId":"get-user-balance","parameters":[{"name":"guild_id","in":"path","schema":{"type":"integer","format":"int64"},"required":true},{"name":"user_id","in":"path","schema":{"type":"integer","format":"int64"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"rank\": \"2\",\n  \"user_id\": \"261674810914897931\",\n  \"cash\": 95,\n  \"bank\": 95044935,\n  \"total\": 95045030\n}"}},"schema":{"type":"object","properties":{"rank":{"type":"string","example":"2"},"user_id":{"type":"string","example":"261674810914897931"},"cash":{"type":"integer","example":95,"default":0},"bank":{"type":"integer","example":95044935,"default":0},"total":{"type":"integer","example":95045030,"default":0}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"javascript","code":"const { Client } = require('unb-api');\nconst client = new Client('API_TOKEN');\n\nconst guildId = '305129477627969547';\nconst userId = '261674810914897931';\n\nclient.getUserBalance(guildId, userId);","name":"unb-api.js"}],"samples-languages":["javascript"]}},"put":{"summary":"Set Balance","description":"Set the User's balance to the given params","operationId":"put-user-balance","parameters":[{"name":"guild_id","in":"path","schema":{"type":"integer","format":"int64"},"required":true},{"name":"user_id","in":"path","schema":{"type":"integer","format":"int64"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"cash":{"type":"integer","format":"int32"},"bank":{"type":"integer","format":"int32"},"reason":{"type":"string","description":"Audit log reason"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{ \n  \"user_id\": \"261674810914897931\", \n  \"cash\": 200, \n  \"bank\": 0, \n  \"total\": 200 \n}"}},"schema":{"type":"object","properties":{"user_id":{"type":"string","example":"261674810914897931"},"cash":{"type":"integer","example":200,"default":0},"bank":{"type":"integer","example":0,"default":0},"total":{"type":"integer","example":200,"default":0}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"javascript","code":"const { Client } = require('unb-api');\nconst client = new Client('API_TOKEN');\n\nconst guildId = '305129477627969547';\nconst userId = '261674810914897931';\n\nclient.setUserBalance(guildId, userId, { cash: 200, bank: 0 });","name":"unb-api.js"}],"samples-languages":["javascript"]}},"patch":{"summary":"Update Balance","description":"Increase or decrease the User's balance by a value given in the params","operationId":"patch-user-balance","parameters":[{"name":"guild_id","in":"path","schema":{"type":"integer","format":"int64"},"required":true},{"name":"user_id","in":"path","schema":{"type":"integer","format":"int64"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"cash":{"type":"integer","format":"int32"},"bank":{"type":"integer","format":"int32"},"reason":{"type":"string","description":"Audit log reason"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{ \n  \"user_id\": \"261674810914897931\", \n  \"cash\": 190, \n  \"bank\": 50, \n  \"total\": 240 \n}"}},"schema":{"type":"object","properties":{"user_id":{"type":"string","example":"261674810914897931"},"cash":{"type":"integer","example":190,"default":0},"bank":{"type":"integer","example":50,"default":0},"total":{"type":"integer","example":240,"default":0}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"javascript","code":"const { Client } = require('unb-api');\nconst client = new Client('API_TOKEN');\n\nconst guildId = '305129477627969547';\nconst userId = '261674810914897931';\n\nclient.editUserBalance(guildId, userId, { cash: -10, bank: 50 });","name":"unb-api.js"}],"samples-languages":["javascript"]}}},"/guilds/{guild_id}/users/":{"get":{"summary":"Get Leaderboard","description":"","operationId":"get-guild-leaderboard","parameters":[{"name":"guild_id","in":"path","schema":{"type":"integer","format":"int64"},"required":true},{"name":"sort","in":"query","description":"Sort the leaderboard by `cash`, `bank` or `total`.","schema":{"type":"string","default":"total"}},{"name":"limit","in":"query","description":"Limit the number of users returned. If page is given the default will be 1000.","schema":{"type":"integer","format":"int32","default":1000}},{"name":"page","in":"query","description":"If a page is given the response will be `{ users: Array, total_pages: Number }`","schema":{"type":"integer","format":"int32","default":1}},{"name":"offset","in":"query","description":"Specify the offset of the first user (shouldn't be used with `page`)","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"with page":{"value":"{\n  \"users\": [\n    { \n      \"rank\": \"1\", \n      \"user_id\": \"198736292039753728\", \n      \"cash\": 54, \n      \"bank\": 101290610, \n      \"total\": 101290664 \n    },\n    {\n      \"rank\": \"2\", \n      \"user_id\": \"261674810914897931\", \n      \"cash\": 95, \n      \"bank\": 95044735, \n    \t\"total\": 95044830\n  \t}\n\t],\n  \"total_pages\": 1\n}"},"without page":{"value":"[\n  { \n    \"rank\": \"1\", \n    \"user_id\": \"198736292039753728\", \n    \"cash\": 54, \n    \"bank\": 101290610, \n    \"total\": 101290664 \n  },\n  {\n    \"rank\": \"2\", \n    \"user_id\": \"261674810914897931\", \n    \"cash\": 95, \n    \"bank\": 95044735, \n    \"total\": 95044830\n  }\n]"}},"schema":{"oneOf":[{"title":"with page","type":"object","properties":{"users":{"type":"array","items":{"type":"object","properties":{"rank":{"type":"string","example":"1"},"user_id":{"type":"string","example":"198736292039753728"},"cash":{"type":"integer","example":54,"default":0},"bank":{"type":"integer","example":101290610,"default":0},"total":{"type":"integer","example":101290664,"default":0}}}},"total_pages":{"type":"integer","example":1,"default":0}}},{"title":"without page","type":"array","items":{"type":"object","properties":{"rank":{"type":"string","example":"1"},"user_id":{"type":"string","example":"198736292039753728"},"cash":{"type":"integer","example":54,"default":0},"bank":{"type":"integer","example":101290610,"default":0},"total":{"type":"integer","example":101290664,"default":0}}}}]}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"javascript","code":"const { Client } = require('unb-api');\nconst client = new Client('API_TOKEN');\n\nconst guildId = '305129477627969547';\n\nclient.getGuildLeaderboard(guildId, { sort: 'cash' });","name":"unb-api.js"}],"samples-languages":["javascript"]}}},"/guilds/{guild_id}":{"get":{"summary":"Get Guild","description":"","operationId":"get-guild","parameters":[{"name":"guild_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"305129477627969547\",\n  \"name\": \"🍕 UnbelievaBoat 🍕\",\n  \"icon\": \"a_2cadce0327733c0b1835883eb7fd9660\",\n  \"owner_id\": \"261674810914897931\",\n  \"member_count\": 123456,\n  \"symbol\": \"<:applepizza:451430693147508746>\"\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"305129477627969547"},"name":{"type":"string","example":"🍕 UnbelievaBoat 🍕"},"icon":{"type":"string","example":"a_2cadce0327733c0b1835883eb7fd9660"},"owner_id":{"type":"string","example":"261674810914897931"},"member_count":{"type":"integer","example":123456,"default":0},"symbol":{"type":"string","example":"<:applepizza:451430693147508746>"}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"javascript","code":"const { Client } = require('unb-api');\nconst client = new Client('API_TOKEN');\n\nconst guildId = '305129477627969547';\n\nclient.getGuild(guildId);","name":"unb-api.js"}],"samples-languages":["javascript"]}}},"/applications/@me/guilds/{guild_id}":{"get":{"summary":"Get Application Permissions","description":"","operationId":"get-application-permissions","parameters":[{"name":"guild_id","in":"path","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"permissions\": 3\n}"}},"schema":{"type":"object","properties":{"permissions":{"type":"integer","example":3,"default":0}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"javascript","code":"const { Client } = require('unb-api');\nconst client = new Client('API_TOKEN');\n\nconst guildId = '305129477627969547';\n\nclient.getApplicationPermission(guildId)\n    .then(permission => {\n        console.log(permission.has('economy'));\n    });","name":"unb-api.js"}],"samples-languages":["javascript"]}}},"/guilds/{guild_id}/items":{"get":{"summary":"Get Store Items","description":"","operationId":"get-store-items","parameters":[{"name":"guild_id","in":"path","schema":{"type":"integer","format":"int64"},"required":true},{"name":"sort","in":"query","description":"Comma separated list. (id, price, name, stock_remaining, expires_at)","schema":{"type":"string","default":"id"}},{"name":"limit","in":"query","schema":{"type":"integer","format":"int32","default":100}},{"name":"page","in":"query","schema":{"type":"integer","format":"int32","default":1}},{"name":"query","in":"query","description":"Search for an item by name","schema":{"type":"string"}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"page\": 1,\n  \"total_pages\": 1,\n  \"items\": []\n}"}},"schema":{"type":"object","properties":{"page":{"type":"integer","example":1,"default":0},"total_pages":{"type":"integer","example":1,"default":0},"items":{"type":"array","items":{"type":"object","properties":{}}}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"javascript","code":"const { Client } = require('unb-api');\nconst client = new Client('API_TOKEN');\n\nconst guildId = '305129477627969547';\n\nconst { page, totalPages, items } = await client.getItems(guildId, { sort: ['id'], page: 1 });\nconsole.log(items);","name":"unb-api.js"}],"samples-languages":["javascript"]}},"post":{"summary":"Create Store Item","description":"","operationId":"create-store-item","parameters":[{"name":"guild_id","in":"path","schema":{"type":"integer","format":"int64"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"price":{"type":"integer","default":0,"format":"int64"},"description":{"type":"string"},"is_inventory":{"type":"boolean","default":true},"is_usable":{"type":"boolean","default":true},"is_sellable":{"type":"boolean","default":true},"stock_remaining":{"type":"integer","format":"int32"},"unlimited_stock":{"type":"boolean","default":true},"requirements":{"type":"array","items":{"properties":{"type":{"type":"string","enum":["ROLE","TOTAL_BALANCE","ITEM"]},"match_type":{"type":"string","enum":["EVERY","AT_LEAST_ONE","NONE"]},"ids":{"type":"array","default":[],"items":{"type":"integer","format":"int64"}},"balance":{"type":"integer","format":"int64"}},"type":"object"}},"actions":{"type":"array","items":{"properties":{"type":{"type":"string","enum":["RESPOND","ADD_ROLES","REMOVE_ROLES","ADD_BALANCE","REMOVE_BALANCE","ADD_ITEMS","REMOVE_ITEMS"]},"message":{"type":"object","properties":{"content":{"type":"string"},"embeds":{"type":"array"}}},"ids":{"type":"array","default":[],"items":{"type":"integer","format":"int64"}},"balance":{"type":"integer","format":"int64"}},"type":"object"}},"expires_at":{"type":"string","description":"ISO 8601 timestamp","format":"date-time"},"emoji_unicode":{"type":"string"},"emoji_id":{"type":"integer","format":"int64"},"is_listed":{"type":"boolean","default":true}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"956192502820503552\",\n  \"name\": \"walter ❤️\",\n  \"price\": \"200\",\n  \"description\": \"\",\n  \"is_inventory\": true,\n  \"is_usable\": true,\n  \"is_sellable\": true,\n  \"stock_remaining\": 0,\n  \"unlimited_stock\": true,\n  \"requirements\": [\n    {\n      \"type\": 1,\n      \"match_type\": 1,\n      \"ids\": [\n        \"613131165137895454\"\n      ]\n    }\n  ],\n  \"actions\": [\n    {\n      \"type\": 1,\n      \"message\": {\n        \"content\": \"walter the cutie\"\n      }\n    }\n  ],\n  \"emoji_unicode\": \"\",\n  \"emoji_id\": \"701546984162459738\",\n  \"expires_at\": null\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"956192502820503552"},"name":{"type":"string","example":"walter ❤️"},"price":{"type":"string","example":"200"},"description":{"type":"string","example":""},"is_inventory":{"type":"boolean","example":true,"default":true},"is_usable":{"type":"boolean","example":true,"default":true},"is_sellable":{"type":"boolean","example":true,"default":true},"stock_remaining":{"type":"integer","example":0,"default":0},"unlimited_stock":{"type":"boolean","example":true,"default":true},"requirements":{"type":"array","items":{"type":"object","properties":{"type":{"type":"integer","example":1,"default":0},"match_type":{"type":"integer","example":1,"default":0},"ids":{"type":"array","items":{"type":"string","example":"613131165137895454"}}}}},"actions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"integer","example":1,"default":0},"message":{"type":"object","properties":{"content":{"type":"string","example":"walter the cutie"}}}}}},"emoji_unicode":{"type":"string","example":""},"emoji_id":{"type":"string","example":"701546984162459738"},"expires_at":{}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"node","code":"const { Client } = require('unb-api');\nconst client = new Client('API_TOKEN');\n\nconst guildId = '305129477627969547';\n\nconst item = await client.createItem(guildId, { name: 'Pizza', price: 200 });\nconsole.log(item);","name":"unb-api.js"}],"samples-languages":["node"]}}},"/guilds/{guild_id}/items/{item_id}":{"get":{"summary":"Get Store Item","description":"","operationId":"get-store-item","parameters":[{"name":"guild_id","in":"path","schema":{"type":"integer","format":"int64"},"required":true},{"name":"item_id","in":"path","schema":{"type":"integer","format":"int64"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"956192502820503552\",\n  \"name\": \"walter ❤️\",\n  \"price\": \"200\",\n  \"description\": \"\",\n  \"is_inventory\": true,\n  \"is_usable\": true,\n  \"is_sellable\": true,\n\t\"is_visible\": true,\n  \"stock_remaining\": 0,\n  \"unlimited_stock\": true,\n  \"requirements\": [\n    {\n      \"type\": 1,\n      \"match_type\": 1,\n      \"ids\": [\n        \"613131165137895454\"\n      ]\n    }\n  ],\n  \"actions\": [\n    {\n      \"type\": 1,\n      \"message\": {\n        \"content\": \"walter the cutie\"\n      }\n    }\n  ],\n  \"emoji_unicode\": \"\",\n  \"emoji_id\": \"701546984162459738\",\n  \"expires_at\": null\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"956192502820503552"},"name":{"type":"string","example":"walter ❤️"},"price":{"type":"string","example":"200"},"description":{"type":"string","example":""},"is_inventory":{"type":"boolean","example":true,"default":true},"is_usable":{"type":"boolean","example":true,"default":true},"is_sellable":{"type":"boolean","example":true,"default":true},"is_visible":{"type":"boolean","example":true,"default":true},"stock_remaining":{"type":"integer","example":0,"default":0},"unlimited_stock":{"type":"boolean","example":true,"default":true},"requirements":{"type":"array","items":{"type":"object","properties":{"type":{"type":"integer","example":1,"default":0},"match_type":{"type":"integer","example":1,"default":0},"ids":{"type":"array","items":{"type":"string","example":"613131165137895454"}}}}},"actions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"integer","example":1,"default":0},"message":{"type":"object","properties":{"content":{"type":"string","example":"walter the cutie"}}}}}},"emoji_unicode":{"type":"string","example":""},"emoji_id":{"type":"string","example":"701546984162459738"},"expires_at":{}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"javascript","code":"const { Client } = require('unb-api');\nconst client = new Client('API_TOKEN');\n\nconst guildId = '305129477627969547';\nconst itemId = '956192502820503552';\n\nconst item = await client.getItem(guildId, itemId);\nconsole.log(item);","name":"unb-api.js"}],"samples-languages":["javascript"]}},"patch":{"summary":"Edit Store Item","description":"","operationId":"patch-store-item","parameters":[{"name":"guild_id","in":"path","schema":{"type":"integer","format":"int64"},"required":true},{"name":"item_id","in":"path","schema":{"type":"integer","format":"int64"},"required":true},{"name":"cascade_update","in":"query","description":"Inventory items will also be updated if set to true","schema":{"type":"boolean","default":false}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"price":{"type":"integer","format":"int64"},"description":{"type":"string"},"is_inventory":{"type":"boolean"},"is_usable":{"type":"boolean"},"is_sellable":{"type":"boolean"},"stock_remaining":{"type":"integer","format":"int32"},"unlimited_stock":{"type":"boolean"},"requirements":{"type":"array","items":{"properties":{"type":{"type":"string","enum":["ROLE","TOTAL_BALANCE","ITEM"]},"match_type":{"type":"string","enum":["EVERY","AT_LEAST_ONE","NONE"]},"ids":{"type":"array","default":[],"items":{"type":"integer","format":"int64"}},"balance":{"type":"integer","format":"int64"}},"type":"object"}},"actions":{"type":"array","items":{"properties":{"type":{"type":"string","enum":["RESPOND","ADD_ROLES","REMOVE_ROLES","ADD_BALANCE","REMOVE_BALANCE","ADD_ITEMS","REMOVE_ITEMS"]},"message":{"type":"object","properties":{"content":{"type":"string"},"embeds":{"type":"array"}}},"ids":{"type":"array","default":[],"items":{"type":"integer","format":"int64"}},"balance":{"type":"integer","format":"int64"}},"type":"object"}},"expires_at":{"type":"string","description":"ISO 8601 timestamp","format":"date-time"},"emoji_unicode":{"type":"string"},"emoji_id":{"type":"integer","format":"int64"},"is_listed":{"type":"boolean"}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"id\": \"956192502820503552\",\n  \"name\": \"walter ❤️\",\n  \"price\": \"200\",\n  \"description\": \"\",\n  \"is_inventory\": true,\n  \"is_usable\": true,\n  \"is_sellable\": true,\n  \"stock_remaining\": 0,\n  \"unlimited_stock\": true,\n  \"requirements\": [\n    {\n      \"type\": 1,\n      \"match_type\": 1,\n      \"ids\": [\n        \"613131165137895454\"\n      ]\n    }\n  ],\n  \"actions\": [\n    {\n      \"type\": 1,\n      \"message\": {\n        \"content\": \"walter the cutie\"\n      }\n    }\n  ],\n  \"emoji_unicode\": \"\",\n  \"emoji_id\": \"701546984162459738\",\n  \"expires_at\": null\n}"}},"schema":{"type":"object","properties":{"id":{"type":"string","example":"956192502820503552"},"name":{"type":"string","example":"walter ❤️"},"price":{"type":"string","example":"200"},"description":{"type":"string","example":""},"is_inventory":{"type":"boolean","example":true,"default":true},"is_usable":{"type":"boolean","example":true,"default":true},"is_sellable":{"type":"boolean","example":true,"default":true},"stock_remaining":{"type":"integer","example":0,"default":0},"unlimited_stock":{"type":"boolean","example":true,"default":true},"requirements":{"type":"array","items":{"type":"object","properties":{"type":{"type":"integer","example":1,"default":0},"match_type":{"type":"integer","example":1,"default":0},"ids":{"type":"array","items":{"type":"string","example":"613131165137895454"}}}}},"actions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"integer","example":1,"default":0},"message":{"type":"object","properties":{"content":{"type":"string","example":"walter the cutie"}}}}}},"emoji_unicode":{"type":"string","example":""},"emoji_id":{"type":"string","example":"701546984162459738"},"expires_at":{}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"javascript","code":"const { Client } = require('unb-api');\nconst client = new Client('API_TOKEN');\n\nconst guildId = '305129477627969547';\nconst itemId = '956192502820503552';\n\nconst item = await client.editItem(guildId, itemId, { price: 200 });\nconsole.log(item);","name":"unb-api.js"}],"samples-languages":["javascript"]}},"delete":{"summary":"Delete Store Item","description":"","operationId":"delete-store-item","parameters":[{"name":"guild_id","in":"path","schema":{"type":"integer","format":"int64"},"required":true},{"name":"item_id","in":"path","schema":{"type":"integer","format":"int64"},"required":true},{"name":"cascade_delete","in":"query","description":"Inventory items will also be deleted if set to true","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}},"400":{"description":"400","content":{"application/json":{"examples":{"Result":{"value":"{}"}},"schema":{"type":"object","properties":{}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"javascript","code":"const { Client } = require('unb-api');\nconst client = new Client('API_TOKEN');\n\nconst guildId = '305129477627969547';\nconst itemId = '956192502820503552';\n\nawait client.deleteItem(guildId, itemId);","name":"unb-api.js"}],"samples-languages":["javascript"]}}},"/guilds/{guild_id}/users/{user_id}/inventory":{"get":{"summary":"Get Inventory Items","description":"","operationId":"get-user-inventory-items","parameters":[{"name":"guild_id","in":"path","schema":{"type":"integer","format":"int64"},"required":true},{"name":"sort","in":"query","description":"Comma separated list. (item_id, name, quantity)","schema":{"type":"string","default":"id"}},{"name":"limit","in":"query","schema":{"type":"integer","format":"int32","default":100}},{"name":"page","in":"query","schema":{"type":"integer","format":"int32","default":1}},{"name":"query","in":"query","description":"Search for an item by name","schema":{"type":"string"}},{"name":"user_id","in":"path","schema":{"type":"integer","format":"int64"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"page\": 1,\n  \"total_pages\": 1,\n  \"items\": []\n}"}},"schema":{"type":"object","properties":{"page":{"type":"integer","example":1,"default":0},"total_pages":{"type":"integer","example":1,"default":0},"items":{"type":"array","items":{"type":"object","properties":{}}}}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"javascript","code":"const { Client } = require('unb-api');\nconst client = new Client('API_TOKEN');\n\nconst guildId = '305129477627969547';\nconst userId = '261674810914897931';\n\nconst { page, totalPages, items } = await client.getInventoryItems(guildId, userId, { sort: ['item_id'], page: 1 });\nconsole.log(items);","name":"unb-api.js"}],"samples-languages":["javascript"]}},"post":{"summary":"Add Inventory Item","description":"","operationId":"add-inventory-item","parameters":[{"name":"guild_id","in":"path","schema":{"type":"integer","format":"int64"},"required":true},{"name":"user_id","in":"path","schema":{"type":"integer","format":"int64"},"required":true}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"item_id":{"type":"integer","description":"The item ID to give the user","format":"int64"},"quantity":{"type":"integer","description":"Quantity of the item to add","format":"int32"},"options":{"type":"object","properties":{"inventory_user_id":{"type":"integer","description":"User ID of the inventory to add the item from (can be used if the item no longer exists in the store or the item settings differ)","format":"int64"}}}}}}}},"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"item_id\": \"956192502820503552\",\n  \"name\": \"walter ❤️\",\n  \"description\": \"\",\n  \"is_usable\": true,\n  \"is_sellable\": true,\n  \"quantity\": 2,\n  \"requirements\": [\n    {\n      \"type\": 1,\n      \"match_type\": 1,\n      \"ids\": [\n        \"613131165137895454\"\n      ]\n    }\n  ],\n  \"actions\": [\n    {\n      \"type\": 1,\n      \"message\": {\n        \"content\": \"walter the cutie\"\n      }\n    }\n  ],\n  \"emoji_unicode\": \"\",\n  \"emoji_id\": \"701546984162459738\",\n}"}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"javascript","code":"const { Client } = require('unb-api');\nconst client = new Client('API_TOKEN');\n\nconst guildId = '305129477627969547';\nconst userId = '261674810914897931';\nconst itemId = '956192502820503552';\n\nconst inventoryItem = await client.addInventoryItem(guildId, userId, itemId, 1);\nconsole.log(inventoryItem);","name":"unb-api.js"}],"samples-languages":["javascript"]}}},"/guilds/{guild_id}/users/{user_id}/inventory/{item_id}":{"get":{"summary":"Get Inventory Item","description":"","operationId":"get-inventory-item","parameters":[{"name":"guild_id","in":"path","schema":{"type":"integer","format":"int64"},"required":true},{"name":"user_id","in":"path","schema":{"type":"integer","format":"int64"},"required":true},{"name":"item_id","in":"path","schema":{"type":"integer","format":"int64"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n  \"item_id\": \"956192502820503552\",\n  \"name\": \"walter ❤️\",\n  \"description\": \"\",\n  \"is_usable\": true,\n  \"is_sellable\": true,\n  \"quantity\": 1,\n  \"requirements\": [\n    {\n      \"type\": 1,\n      \"match_type\": 1,\n      \"ids\": [\n        \"613131165137895454\"\n      ]\n    }\n  ],\n  \"actions\": [\n    {\n      \"type\": 1,\n      \"message\": {\n        \"content\": \"walter the cutie\"\n      }\n    }\n  ],\n  \"emoji_unicode\": \"\",\n  \"emoji_id\": \"701546984162459738\",\n}"}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"javascript","code":"const { Client } = require('unb-api');\nconst client = new Client('API_TOKEN');\n\nconst guildId = '305129477627969547';\nconst userId = '261674810914897931';\nconst itemId = '956192502820503552';\n\nconst inventoryItem = await client.getInventoryItem(guildId, userId, itemId);\nconsole.log(inventoryItem);","name":"unb-api.js"}],"samples-languages":["javascript"]}},"delete":{"summary":"Remove Inventory Item","description":"","operationId":"remove-inventory-item","parameters":[{"name":"guild_id","in":"path","schema":{"type":"integer","format":"int64"},"required":true},{"name":"user_id","in":"path","schema":{"type":"integer","format":"int64"},"required":true},{"name":"item_id","in":"path","schema":{"type":"integer","format":"int64"},"required":true},{"name":"quantity","in":"query","description":"Quantity to remove","schema":{"type":"integer","format":"int32"}}],"responses":{"204":{"description":"204","content":{"application/json":{"examples":{"Result":{"value":""}}}}}},"deprecated":false,"x-readme":{"code-samples":[{"language":"javascript","code":"const { Client } = require('unb-api');\nconst client = new Client('API_TOKEN');\n\nconst guildId = '305129477627969547';\nconst userId = '261674810914897931';\nconst itemId = '956192502820503552';\n\nawait client.removeInventoryItem(guildId, userId, itemId, 1);","name":"unb-api.js"}],"samples-languages":["javascript"]}}}},"x-readme":{"headers":[],"explorer-enabled":true,"proxy-enabled":true},"x-readme-fauxas":true}