Advertisement
Guest User

Untitled

a guest
Sep 20th, 2019
1,222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.46 KB | None | 0 0
  1. API Documentation
  2. This is the documentation for the API to obtain image urls and the shop rotation.
  3.  
  4. If you use our API, please leave credit to fnbr.co in your application. Thanks.
  5.  
  6. Restrictions
  7. All requests must include the header x-api-key with your API key.
  8.  
  9. We don't have a strict rate limit, so please be sensible, any abuse will lead to a ban.
  10.  
  11. 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
  12.  
  13. Your API Key
  14. Hover below to reveal API key
  15.  
  16. 421f2847-a8a1-4313-a2fb-bbc2fc16a4a9
  17. GET https://fnbr.co/api/images
  18. You can request the image urls for a specific cosmetic or search up to 15 with the same name.
  19.  
  20. Add the argument search={NAME} where {NAME} is the name of the cosmetic, this is case insensitive.
  21.  
  22. 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.
  23.  
  24. The response contains an object called images with the direct image urls for the cosmetics.
  25.  
  26. The cosmetic type can be one of the following:
  27.  
  28. backpack, emote, glider, emoji, loading, outfit, pickaxe, skydive, umbrella, spray, toy, pet, music, wrap, banner, bundle, misc
  29.  
  30. If you wanted to find the images for 'ghoul trooper' you would get a response like this:
  31.  
  32. {
  33. "status": 200,
  34. "data": [
  35. {
  36. "id": "5ab16c0e5f957f27504aa4e4", // An ID for use within fnbr.co
  37. "name": "Ghoul Trooper", // The name of the cosmetic
  38. "price": "1,500", // The price of the cosmetic (string)
  39. "priceIcon": "vbucks", // The price icon
  40. "priceIconLink": "https://image.fnbr.co/price/icon_vbucks.png", // A link to the price icon
  41. "images": { // Object containing all image urls
  42. "icon": "https://image.fnbr.co/outfit/5ab16c0e5f957f27504aa4e4/icon.png", // The 'icon' url, all items have this value or placeholder url
  43. "png": "https://image.fnbr.co/outfit/5ab16c0e5f957f27504aa4e4/png.png", // An optional 'png' url
  44. "gallery": "https://image.fnbr.co/outfit/5ab16c0e5f957f27504aa4e4/gallery.jpg", // An optional 'gallery' url, this value is DEPRECATED
  45. "featured": "https://image.fnbr.co/outfit/5ab16c0e5f957f27504aa4e4/featured.png", // An optional 'featured' url
  46. "resizeAvailable": true // If there are resizes available for icon and featured (see detail below)
  47. },
  48. "rarity": "epic", // The rarity as a lowercase string
  49. "type": "outfit", // The item type as a lowercase string
  50. "slug": "ghoul-trooper", // The url 'slug' for this item
  51. "readableType": "Outfit", // A user presentable version of the item type
  52. "description": "Epic ghoul trooper outfit." // The description of this item
  53. }
  54. ],
  55. "query": { // The incoming query as the server understood it
  56. "search": "ghoul trooper", // The search parameter
  57. "limit": 1 // The limit provided, or default of 1
  58. }
  59. }
  60. GET https://fnbr.co/api/shop
  61. Use this endpoint to get the current shop rotation.
  62.  
  63. {
  64. "status": 200,
  65. "data": {
  66. "date" : "2018-04-03T00:00:00.000Z", // Example date string in ISO8601 format and UTC
  67. "featured": [
  68. // An array of objects similar to the response in /api/images
  69. ],
  70. "daily": [
  71. // An array of objects similar to the response in /api/images
  72. ]
  73. }
  74. }
  75. 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:
  76.  
  77. {
  78. "status": 404,
  79. "error": "No data found for [today's date as DD/MM/YYYY]"
  80. }
  81. There is currently no endpoint to show all cosmetics in the directory.
  82.  
  83. GET https://fnbr.co/api/stats
  84. We have this endpoint to provide a breakdown of how many of each type of cosmetic there are in each rarity.
  85.  
  86. GET https://fnbr.co/api/upcoming
  87. This will return an array of items which are upcoming/unreleased.
  88.  
  89. {
  90. "status": 200,
  91. "data": [
  92. // An array of objects similar to the response in /api/images
  93. ]
  94. }
  95. Image URLs
  96. Image URLs are in the format: https://image.fnbr.co/{Cosmetic Type}/{Cosmetic Id}/{Image}
  97.  
  98. Example URL for Backup Plan (Back Bling) icon:
  99.  
  100. https://image.fnbr.co/backpack/5ab155cbe9847b3170da0320/icon.png
  101.  
  102. Example URL for Havoc (Outfit) png:
  103.  
  104. https://image.fnbr.co/outfit/5ab1577ee9847b3170da0328/png.png
  105.  
  106. Example URL for Bear Force One (Glider) gallery image: This image type is deprecated and no longer updated
  107.  
  108. https://image.fnbr.co/glider/5ab163f9c3a23b4380359482/gallery.jpg
  109.  
  110. Example URL for Ghoul Trooper (Outfit) featured image:
  111.  
  112. https://image.fnbr.co/outfit/5ab16c0e5f957f27504aa4e4/featured.png
  113.  
  114. Image Resizing
  115. We also provide resized versions of the icon and featured images, which are useful for saving bandwidth on mobile devices and improving load times.
  116.  
  117. For icon images we provide resizes in the following resolutions: 128, 192, 256, 320
  118.  
  119. For featured images we provide resizes in the following resolutions: 128, 192, 256, 320, 512
  120.  
  121. If the resizeAvailable flag is true in the images object, these resizes are available for use.
  122.  
  123. Just append the size onto the end of an image url to use it like this:
  124.  
  125. https://image.fnbr.co/pickaxe/5ab17cf25f957f27504aa538/icon_320.png
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement