Initial api abstraction
This commit is contained in:
parent
f8698c13df
commit
399ce2519a
1 changed files with 12 additions and 0 deletions
12
Shared/Abstraction.py
Normal file
12
Shared/Abstraction.py
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
import socket
|
||||||
|
from ESock import ESock
|
||||||
|
|
||||||
|
class fl0wAPI:
|
||||||
|
def __init__(self, address, client_type):
|
||||||
|
self.sock = socket.create_connection(address)
|
||||||
|
|
||||||
|
self.authed = True
|
||||||
|
|
||||||
|
def auth(self, user, password):
|
||||||
|
self.sock.send({"auth" : {"user" : user, "pw" : password}})
|
||||||
|
if self.sock.recv()
|
Reference in a new issue