cc-ampapi 1.2.1__tar.gz → 1.3.0__tar.gz

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.
Files changed (30) hide show
  1. {cc_ampapi-1.2.1/cc_ampapi.egg-info → cc_ampapi-1.3.0}/PKG-INFO +1 -1
  2. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/ampapi/__init__.py +2 -2
  3. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/ampapi/base.py +25 -26
  4. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0/cc_ampapi.egg-info}/PKG-INFO +1 -1
  5. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/LICENSE +0 -0
  6. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/LICENSE-dpy +0 -0
  7. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/MANIFEST.in +0 -0
  8. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/README.md +0 -0
  9. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/ampapi/adsmodule.py +0 -0
  10. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/ampapi/analytics.py +0 -0
  11. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/ampapi/bridge.py +0 -0
  12. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/ampapi/controller.py +0 -0
  13. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/ampapi/core.py +0 -0
  14. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/ampapi/dataclass.py +0 -0
  15. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/ampapi/emailsender.py +0 -0
  16. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/ampapi/enums.py +0 -0
  17. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/ampapi/filebackup.py +0 -0
  18. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/ampapi/filemanager.py +0 -0
  19. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/ampapi/instance.py +0 -0
  20. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/ampapi/minecraft.py +0 -0
  21. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/ampapi/modules.py +0 -0
  22. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/ampapi/types_.py +0 -0
  23. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/ampapi/util.py +0 -0
  24. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/cc_ampapi.egg-info/SOURCES.txt +0 -0
  25. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/cc_ampapi.egg-info/dependency_links.txt +0 -0
  26. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/cc_ampapi.egg-info/requires.txt +0 -0
  27. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/cc_ampapi.egg-info/top_level.txt +0 -0
  28. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/pyproject.toml +0 -0
  29. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/requirements.txt +0 -0
  30. {cc_ampapi-1.2.1 → cc_ampapi-1.3.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cc-ampapi
3
- Version: 1.2.1
3
+ Version: 1.3.0
4
4
  Summary: A Python wrapper for the AMP API by CubeCoders
5
5
  Author-email: k8thekat <Cadwalladerkatelynn+AMPAPI@gmail.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -25,7 +25,7 @@ from __future__ import annotations
25
25
  __title__ = "CubeCoders AMP API"
26
26
  __author__ = "k8thekat"
27
27
  __license__ = "GNU"
28
- __version__ = "1.2.1"
28
+ __version__ = "1.3.0"
29
29
  __credits__ = "AMP by CubeCoders and associates."
30
30
 
31
31
  from typing import Literal, NamedTuple
@@ -55,6 +55,6 @@ class VersionInfo(NamedTuple):
55
55
  releaseLevel: Literal["alpha", "beta", "pre-release", "release", "development"]
56
56
 
57
57
 
58
- version_info: VersionInfo = VersionInfo(Major=1, Minor=2, Revision=1, releaseLevel="release")
58
+ version_info: VersionInfo = VersionInfo(Major=1, Minor=3, Revision=0, releaseLevel="release")
59
59
 
60
60
  del NamedTuple, Literal, VersionInfo
@@ -344,30 +344,29 @@ class Base:
344
344
  raise ValueError(
345
345
  "Please check your 2 Factor Code, should not contain spaces, escape characters and it must be enclosed in quotes!"
346
346
  )
347
- else:
348
- try:
349
- parameters: dict[str, Any] = {
350
- "username": self._bridge.user,
351
- "password": self._bridge.password,
352
- "token": code,
353
- "rememberMe": True,
354
- }
355
-
356
- result: Any = await self._call_api(
357
- api="Core/Login", parameters=parameters, format_data=True, format_=LoginResults
358
- )
359
- if isinstance(result, LoginResults):
360
- # This is our new sessions table to correlate InstanceID to a sessionID.
361
- api_session = APISession(id=result.session_id, ttl=datetime.now())
362
- self._bridge._sessions.update({self.instance_id: api_session})
363
- return result
364
-
365
- else:
366
- self.logger.warning(msg="Failed response from 'API/Core/Login' in <Base>._connect()")
367
- return result
368
-
369
- except Exception as e:
370
- self.logger.warning("Core/Login Exception:", exc_info=e)
347
+ try:
348
+ parameters: dict[str, Any] = {
349
+ "username": self._bridge.user,
350
+ "password": self._bridge.password,
351
+ "token": code,
352
+ "rememberMe": True,
353
+ }
354
+
355
+ result: Any = await self._call_api(
356
+ api="Core/Login", parameters=parameters, format_data=True, format_=LoginResults
357
+ )
358
+ if isinstance(result, LoginResults):
359
+ # This is our new sessions table to correlate InstanceID to a sessionID.
360
+ api_session = APISession(id=result.session_id, ttl=datetime.now())
361
+ self._bridge._sessions.update({self.instance_id: api_session})
362
+ return result
363
+
364
+ else:
365
+ self.logger.warning(msg="Failed response from 'API/Core/Login' in <Base>._connect()")
366
+ return result
367
+
368
+ except Exception as e:
369
+ self.logger.warning("Core/Login Exception:", exc_info=e)
371
370
  else:
372
371
  return
373
372
 
@@ -563,8 +562,8 @@ class Base:
563
562
  if bridge.use_2fa is True:
564
563
  if bridge.token == "":
565
564
  raise ValueError("You must provide a 2FA Token if you are using 2FA.")
566
- elif bridge.token.startswith(("'", '"')) is False or bridge.token.endswith(("'", '"')) is False:
567
- raise ValueError("2FA Token must be enclosed in quotes.")
565
+ # elif bridge.token.startswith(("'", '"')) is False or bridge.token.endswith(("'", '"')) is False:
566
+ # raise ValueError("2FA Token must be enclosed in quotes.")
568
567
  # Removed starting and ending quotes
569
568
  elif len(bridge.token) < 8:
570
569
  raise ValueError(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cc-ampapi
3
- Version: 1.2.1
3
+ Version: 1.3.0
4
4
  Summary: A Python wrapper for the AMP API by CubeCoders
5
5
  Author-email: k8thekat <Cadwalladerkatelynn+AMPAPI@gmail.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes