Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff42c04 commit 968ad2aCopy full SHA for 968ad2a
keyauth.py
@@ -495,7 +495,30 @@ def changeUsername(self, username):
495
else:
496
print(json["message"])
497
time.sleep(3)
498
- os._exit(1)
+ os._exit(1)
499
+
500
+ def logout(self):
501
+ self.checkinit()
502
503
+ post_data = {
504
+ "type": "logout",
505
+ "sessionid": self.sessionid,
506
+ "name": self.name,
507
+ "ownerid": self.ownerid
508
+ }
509
510
+ response = self.__do_request(post_data)
511
512
+ json = jsond.loads(response)
513
514
+ if json["success"]:
515
+ print("Successfully logged out")
516
+ time.sleep(3)
517
518
+ else:
519
+ print(json["message"])
520
521
522
523
def __do_request(self, post_data):
524
try:
0 commit comments