-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Tom edited this page Apr 14, 2018
·
10 revisions
All for python 3.5
import fnbr
apikey = 'YOUR_API_KEY'
request = fnbr.Shop(apikey)
response = request.send()
if response.status == 200 and response.type == fnbr.SHOP_TYPE:
shop = response.data
print('Shop for: {0}'.format(shop.date))
print('Daily items:')
for item in shop.daily:
print('\t{0}: {1}'.format(item.name,item.price))
print('Featured items:')
for item in shop.featured:
print('\t{0}: {1}'.format(item.name,item.price))
else:
print('Error getting shop')import fnbr
apikey = 'YOUR_API_KEY'
itemname = 'Rex' # the search is case sensitive
itemtype = 'outfit' # must be one of 'emote','glider','emoji','loading','outfit','pickaxe','skydive','umbrella' or 'misc'. not case sensitive
itemlimit = 1 # integer between 1 and 15
request = fnbr.Image(apikey,search=itemname,type=itemtype,limit=itemlimit)
response = request.send()
if response.status == 200 and response.type == fnbr.IMAGE_TYPE:
print('Results:')
imagedata = response.data
for item in imagedata.results:
print('{0}: {1}'.format(item.name,item.price))
else:
print('Error searching images')import fnbr
apikey = 'YOUR_API_KEY'
request = fnbr.Stat(apikey)
response = request.send()
if response.status == 200 and response.type == fnbr.STAT_TYPE:
statdata = response.data
print('Total cosmetics: {0}'.format(statdata.totalCosmetics))
else:
print('Error getting stats')- APIRequest (parent)
- Images
- Shop
- Stat
- APIResponse (parent)
- ShopResponse
- ImageResponse
- StatResponse