-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.py
39 lines (31 loc) · 921 Bytes
/
example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import requests
import json
from constants import *
import api
t = api.API()
#item Name Search
search = t.itemSearch('BTC')
#item UID Search
UIDSearch = t.itemUIDSearch('5ac84494-465a-424a-b36e-fe22869ba5ec')
#all items dump
f = open("allItems.txt", "w+")
f.write(json.dumps(t.allItems(), indent=4))
f.close()
#RAW BSG all items dump
f = open("BSGItems.txt", "w+")
f.write(json.dumps(t.BSGItems(), indent=4))
f.close()
currency = '₽'
itemUID = search[0]['uid']
itemName = search[0]['name']
itemShortName = search[0]['shortName']
itemPrice = search[0]['price']
item24HPrice = search[0]['avg24hPrice']
item7DPrice = search[0]['avg7daysPrice']
diff24h = search[0]['diff24h']
diff7days = search[0]['diff7days']
updated = search[0]['updated']
traderName = search[0]['traderName']
traderPrice = search[0]['traderPrice']
wikiLink = search[0]['wikiLink']
icon = search[0]['icon']