mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
allow session() to request a subtree of info
This commit is contained in:

committed by
Jeroen Oudshoorn

parent
b2fe8968b7
commit
6591ea2e37
@ -44,8 +44,10 @@ class Client(object):
|
||||
self.websocket = "ws://%s:%s@%s:%d/api" % (username, password, hostname, port)
|
||||
self.auth = HTTPBasicAuth(username, password)
|
||||
|
||||
def session(self):
|
||||
r = requests.get("%s/session" % self.url, auth=self.auth)
|
||||
# session takes optional argument to pull a sub-dictionary
|
||||
# ex.: "session/wifi", "session/ble"
|
||||
def session(self, sess="session"):
|
||||
r = requests.get("%s/%s" % (self.url, sess), auth=self.auth)
|
||||
return decode(r)
|
||||
|
||||
async def start_websocket(self, consumer):
|
||||
|
Reference in New Issue
Block a user