Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- API Documentation
- This is the documentation for the API to obtain image urls and the shop rotation.
- If you use our API, please leave credit to fnbr.co in your application. Thanks.
- Restrictions
- All requests must include the header x-api-key with your API key.
- We don't have a strict rate limit, so please be sensible, any abuse will lead to a ban.
- Current limits with an API key are 600 requests per minute, this equates to approximately 10 per second when fairly divided. You can see remaining limits using the headers X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset
- Your API Key
- Hover below to reveal API key
- 421f2847-a8a1-4313-a2fb-bbc2fc16a4a9
- GET https://fnbr.co/api/images
- You can request the image urls for a specific cosmetic or search up to 15 with the same name.
- Add the argument search={NAME} where {NAME} is the name of the cosmetic, this is case insensitive.
- As some cosmetics have the same name you can also optionally filter by cosmetic type using the type={TYPE} or limit results using limit={LIMIT}, between 1 and 15, default is 1.
- The response contains an object called images with the direct image urls for the cosmetics.
- The cosmetic type can be one of the following:
- backpack, emote, glider, emoji, loading, outfit, pickaxe, skydive, umbrella, spray, toy, pet, music, wrap, banner, bundle, misc
- If you wanted to find the images for 'ghoul trooper' you would get a response like this:
- {
- "status": 200,
- "data": [
- {
- "id": "5ab16c0e5f957f27504aa4e4", // An ID for use within fnbr.co
- "name": "Ghoul Trooper", // The name of the cosmetic
- "price": "1,500", // The price of the cosmetic (string)
- "priceIcon": "vbucks", // The price icon
- "priceIconLink": "https://image.fnbr.co/price/icon_vbucks.png", // A link to the price icon
- "images": { // Object containing all image urls
- "icon": "https://image.fnbr.co/outfit/5ab16c0e5f957f27504aa4e4/icon.png", // The 'icon' url, all items have this value or placeholder url
- "png": "https://image.fnbr.co/outfit/5ab16c0e5f957f27504aa4e4/png.png", // An optional 'png' url
- "gallery": "https://image.fnbr.co/outfit/5ab16c0e5f957f27504aa4e4/gallery.jpg", // An optional 'gallery' url, this value is DEPRECATED
- "featured": "https://image.fnbr.co/outfit/5ab16c0e5f957f27504aa4e4/featured.png", // An optional 'featured' url
- "resizeAvailable": true // If there are resizes available for icon and featured (see detail below)
- },
- "rarity": "epic", // The rarity as a lowercase string
- "type": "outfit", // The item type as a lowercase string
- "slug": "ghoul-trooper", // The url 'slug' for this item
- "readableType": "Outfit", // A user presentable version of the item type
- "description": "Epic ghoul trooper outfit." // The description of this item
- }
- ],
- "query": { // The incoming query as the server understood it
- "search": "ghoul trooper", // The search parameter
- "limit": 1 // The limit provided, or default of 1
- }
- }
- GET https://fnbr.co/api/shop
- Use this endpoint to get the current shop rotation.
- {
- "status": 200,
- "data": {
- "date" : "2018-04-03T00:00:00.000Z", // Example date string in ISO8601 format and UTC
- "featured": [
- // An array of objects similar to the response in /api/images
- ],
- "daily": [
- // An array of objects similar to the response in /api/images
- ]
- }
- }
- If for some reason we were unable to get the shop data, it is suggested you try again after a few minutes. You will see this response with HTTP Status 404 Not Found:
- {
- "status": 404,
- "error": "No data found for [today's date as DD/MM/YYYY]"
- }
- There is currently no endpoint to show all cosmetics in the directory.
- GET https://fnbr.co/api/stats
- We have this endpoint to provide a breakdown of how many of each type of cosmetic there are in each rarity.
- GET https://fnbr.co/api/upcoming
- This will return an array of items which are upcoming/unreleased.
- {
- "status": 200,
- "data": [
- // An array of objects similar to the response in /api/images
- ]
- }
- Image URLs
- Image URLs are in the format: https://image.fnbr.co/{Cosmetic Type}/{Cosmetic Id}/{Image}
- Example URL for Backup Plan (Back Bling) icon:
- https://image.fnbr.co/backpack/5ab155cbe9847b3170da0320/icon.png
- Example URL for Havoc (Outfit) png:
- https://image.fnbr.co/outfit/5ab1577ee9847b3170da0328/png.png
- Example URL for Bear Force One (Glider) gallery image: This image type is deprecated and no longer updated
- https://image.fnbr.co/glider/5ab163f9c3a23b4380359482/gallery.jpg
- Example URL for Ghoul Trooper (Outfit) featured image:
- https://image.fnbr.co/outfit/5ab16c0e5f957f27504aa4e4/featured.png
- Image Resizing
- We also provide resized versions of the icon and featured images, which are useful for saving bandwidth on mobile devices and improving load times.
- For icon images we provide resizes in the following resolutions: 128, 192, 256, 320
- For featured images we provide resizes in the following resolutions: 128, 192, 256, 320, 512
- If the resizeAvailable flag is true in the images object, these resizes are available for use.
- Just append the size onto the end of an image url to use it like this:
- https://image.fnbr.co/pickaxe/5ab17cf25f957f27504aa538/icon_320.png
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement