-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathusage.py
More file actions
64 lines (47 loc) · 1.68 KB
/
usage.py
File metadata and controls
64 lines (47 loc) · 1.68 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# This is an example usage
import logging
from pprint import pprint
import kuon.bitskins.api.interfaces as bitskins_interfaces
import kuon.watcher.adapters.bitskins as bitskins_adapters
from kuon.watcher import Watcher
class UsageWatcher(object):
"""Example usage for the watcher class of Kuon"""
@staticmethod
def watcher() -> None:
"""Example watcher usage
:return:
"""
Watcher(adapter=bitskins_adapters.BitSkinsSalesAdapter, log_level=logging.DEBUG).start()
class UsageBitSkins(object):
"""Example usages for the implementation of the BitSkins API"""
@staticmethod
def sales_adapter() -> None:
sales_adapter = bitskins_adapters.BitSkinsSalesAdapter()
pprint(sales_adapter.search("m4 howl min"))
@staticmethod
def sales_interface() -> None:
"""Example sales interface usage
:return:
"""
sales_interface = bitskins_interfaces.ISales()
pprint(sales_interface.get_sales_info(market_hash_name="M4A4 | Howl (Factory New)"))
@staticmethod
def pricing_interface() -> None:
"""Example pricing interface usage
:return:
"""
pricing_interface = bitskins_interfaces.IPricing()
pprint(pricing_interface.get_all_item_prices())
pprint(pricing_interface.get_price_data_for_items_on_sale())
@staticmethod
def inventory_interface() -> None:
"""Example pricing interface usage
:return:
"""
inventory_interface = bitskins_interfaces.IInventory()
pprint(inventory_interface.get_my_inventory())
if __name__ == '__main__':
UsageWatcher().watcher()