Greasy Fork is available in English.
Fetches something from itemDB, handling authentication issues arising from the March 2026 API update.
Este script no debería instalarse directamente. Es una biblioteca que utilizan otros scripts mediante la meta-directiva de inclusión // @require https://update.greasyfork.org/scripts/567036/1843896/itemDB%20Fetch%20Lib.js
This is not a script and does nothing on its own. It was created to be @required by userscripts.
This allows an userscript to send a query to itemDB, showing an error message if the user is unauthenticated.
To use it, asynchronously call the function fetchItemDb(url, scriptName, body?).
url: The URL you would use for a fetch (example: https://itemdb.com.br/api/v1/items/negg)
scriptName: Your script's name for UI purposes in case authorization fails
body: The body (data) of your request IF it's a POST request. Otherwise, don't provide it. You should stringify your body before providing it as a parameter.