· 6 years ago · Sep 20, 2019, 01:26 PM
1API Documentation
2This is the documentation for the API to obtain image urls and the shop rotation.
3
4If you use our API, please leave credit to fnbr.co in your application. Thanks.
5
6Restrictions
7All requests must include the header x-api-key with your API key.
8
9We don't have a strict rate limit, so please be sensible, any abuse will lead to a ban.
10
11Current 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
13Your API Key
14Hover below to reveal API key
15
16421f2847-a8a1-4313-a2fb-bbc2fc16a4a9
17GET https://fnbr.co/api/images
18You can request the image urls for a specific cosmetic or search up to 15 with the same name.
19
20Add the argument search={NAME} where {NAME} is the name of the cosmetic, this is case insensitive.
21
22As 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
24The response contains an object called images with the direct image urls for the cosmetics.
25
26The cosmetic type can be one of the following:
27
28backpack, emote, glider, emoji, loading, outfit, pickaxe, skydive, umbrella, spray, toy, pet, music, wrap, banner, bundle, misc
29
30If 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}
60GET https://fnbr.co/api/shop
61Use 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}
75If 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}
81There is currently no endpoint to show all cosmetics in the directory.
82
83GET https://fnbr.co/api/stats
84We have this endpoint to provide a breakdown of how many of each type of cosmetic there are in each rarity.
85
86GET https://fnbr.co/api/upcoming
87This 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}
95Image URLs
96Image URLs are in the format: https://image.fnbr.co/{Cosmetic Type}/{Cosmetic Id}/{Image}
97
98Example URL for Backup Plan (Back Bling) icon:
99
100https://image.fnbr.co/backpack/5ab155cbe9847b3170da0320/icon.png
101
102Example URL for Havoc (Outfit) png:
103
104https://image.fnbr.co/outfit/5ab1577ee9847b3170da0328/png.png
105
106Example URL for Bear Force One (Glider) gallery image: This image type is deprecated and no longer updated
107
108https://image.fnbr.co/glider/5ab163f9c3a23b4380359482/gallery.jpg
109
110Example URL for Ghoul Trooper (Outfit) featured image:
111
112https://image.fnbr.co/outfit/5ab16c0e5f957f27504aa4e4/featured.png
113
114Image Resizing
115We also provide resized versions of the icon and featured images, which are useful for saving bandwidth on mobile devices and improving load times.
116
117For icon images we provide resizes in the following resolutions: 128, 192, 256, 320
118
119For featured images we provide resizes in the following resolutions: 128, 192, 256, 320, 512
120
121If the resizeAvailable flag is true in the images object, these resizes are available for use.
122
123Just append the size onto the end of an image url to use it like this:
124
125https://image.fnbr.co/pickaxe/5ab17cf25f957f27504aa538/icon_320.png