Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6b3e090b4c | |||
| 049beb9526 |
@@ -1,2 +1,4 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from .qopy import Client
|
from .qopy import Client
|
||||||
from .cli import main
|
from .cli import main
|
||||||
|
|||||||
+3
-1
@@ -3,6 +3,7 @@
|
|||||||
# original author.
|
# original author.
|
||||||
|
|
||||||
import hashlib
|
import hashlib
|
||||||
|
import json
|
||||||
import logging
|
import logging
|
||||||
import time
|
import time
|
||||||
|
|
||||||
@@ -120,7 +121,8 @@ class Client:
|
|||||||
raise InvalidAppSecretError(f"Invalid app secret: {r.json()}.\n" + RESET)
|
raise InvalidAppSecretError(f"Invalid app secret: {r.json()}.\n" + RESET)
|
||||||
|
|
||||||
r.raise_for_status()
|
r.raise_for_status()
|
||||||
return r.json()
|
return json.loads(r.text.encode("utf-8", errors="ignore"))
|
||||||
|
# return r.json()
|
||||||
|
|
||||||
def auth(self, email, pwd):
|
def auth(self, email, pwd):
|
||||||
usr_info = self.api_call("user/login", email=email, pwd=pwd)
|
usr_info = self.api_call("user/login", email=email, pwd=pwd)
|
||||||
|
|||||||
Reference in New Issue
Block a user