pymammotion 0.2.20__py3-none-any.whl → 0.2.21__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pymammotion might be problematic. Click here for more details.
- pymammotion/http/http.py +6 -4
- {pymammotion-0.2.20.dist-info → pymammotion-0.2.21.dist-info}/METADATA +1 -1
- {pymammotion-0.2.20.dist-info → pymammotion-0.2.21.dist-info}/RECORD +5 -5
- {pymammotion-0.2.20.dist-info → pymammotion-0.2.21.dist-info}/LICENSE +0 -0
- {pymammotion-0.2.20.dist-info → pymammotion-0.2.21.dist-info}/WHEEL +0 -0
pymammotion/http/http.py
CHANGED
|
@@ -47,10 +47,12 @@ class LoginResponseData(DataClassORJSONMixin):
|
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
class MammotionHTTP:
|
|
50
|
-
def __init__(self,
|
|
50
|
+
def __init__(self, response: Response):
|
|
51
51
|
self._headers = dict()
|
|
52
|
-
self._headers["Authorization"] = f"Bearer {
|
|
53
|
-
self.login_info =
|
|
52
|
+
self._headers["Authorization"] = f"Bearer {response.data.access_token}"
|
|
53
|
+
self.login_info = response.data
|
|
54
|
+
self.msg = response.msg
|
|
55
|
+
self.code = response.code
|
|
54
56
|
|
|
55
57
|
@classmethod
|
|
56
58
|
async def login(cls, session: ClientSession, username: str, password: str) -> Response[LoginResponseData]:
|
|
@@ -75,4 +77,4 @@ class MammotionHTTP:
|
|
|
75
77
|
async def connect_http(username: str, password: str) -> MammotionHTTP:
|
|
76
78
|
async with ClientSession(MAMMOTION_DOMAIN) as session:
|
|
77
79
|
login_response = await MammotionHTTP.login(session, username, password)
|
|
78
|
-
return MammotionHTTP(login_response
|
|
80
|
+
return MammotionHTTP(login_response)
|
|
@@ -42,7 +42,7 @@ pymammotion/data/state_manager.py,sha256=jkedK5qAVDTGqIzlPNCmPpE-Pc1V4e-ZHW6Ds1i
|
|
|
42
42
|
pymammotion/event/__init__.py,sha256=mgATR6vPHACNQ-0zH5fi7NdzeTCDV1CZyaWPmtUusi8,115
|
|
43
43
|
pymammotion/event/event.py,sha256=Fy5-I1p92AO_D67VW4eHQqA4pOt7MZsrP--tVfIVUz8,1820
|
|
44
44
|
pymammotion/http/_init_.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
45
|
-
pymammotion/http/http.py,sha256=
|
|
45
|
+
pymammotion/http/http.py,sha256=izNb6BPy1qB-CXOWXkV8YhhpDQY3QdRVDIt3onQ7FX0,2406
|
|
46
46
|
pymammotion/mammotion/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
47
47
|
pymammotion/mammotion/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
48
48
|
pymammotion/mammotion/commands/abstract_message.py,sha256=nw6r7694yzl7iJKqRqhLmAPRjd_TL_Xo_-JXq2_a_ug,222
|
|
@@ -111,7 +111,7 @@ pymammotion/utility/device_type.py,sha256=KYawu2glZMVlPmxRbA4kVFujXz3miHp3rJiOWR
|
|
|
111
111
|
pymammotion/utility/map.py,sha256=aoi-Luzuph02hKynTofMoq3mnPstanx75MDAVv49CuY,2211
|
|
112
112
|
pymammotion/utility/periodic.py,sha256=9wJMfwXPlx6Mbp3Fws7LLTI34ZDKphH1bva_Ggyk32g,3281
|
|
113
113
|
pymammotion/utility/rocker_util.py,sha256=syPL0QN4zMzHiTIkUKS7RXBBptjdbkfNlPddwUD5V3A,7171
|
|
114
|
-
pymammotion-0.2.
|
|
115
|
-
pymammotion-0.2.
|
|
116
|
-
pymammotion-0.2.
|
|
117
|
-
pymammotion-0.2.
|
|
114
|
+
pymammotion-0.2.21.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
115
|
+
pymammotion-0.2.21.dist-info/METADATA,sha256=GhYka3lZNszqjDllgK7DLJ184QnNH6ZMvsPguG2WxBo,3969
|
|
116
|
+
pymammotion-0.2.21.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
117
|
+
pymammotion-0.2.21.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|