-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
executable file
·31 lines (26 loc) · 869 Bytes
/
main.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
#!/usr/bin/python
import time
import datetime
import requests
from getpass import getpass
import os
from pprint import pprint
import config
from market import *
session = requests.Session()
api = API(session)
def main():
if not os.path.isfile(config.config_name):
config.configure()
username,password = config.get_login()
api.login(username,password)
# examples
# -----------------------------------------------------------------
api.get_userinfo(16251,"suomynona",150863) # supports usernames and userids
api.get_items(50000,50001) # returns inventid 50000,50001
api.get_inventory("hampa",offset=1) # returns 2nd page of hampa's inv
api.send_tc("example",999999999)
api.send_items("example",50000,50001)
# -----------------------------------------------------------------
if __name__ == "__main__":
main()