async-universalis 4.0.2.dev0__tar.gz → 4.1.0.dev0__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 (17) hide show
  1. {async_universalis-4.0.2.dev0/async_universalis.egg-info → async_universalis-4.1.0.dev0}/PKG-INFO +1 -1
  2. {async_universalis-4.0.2.dev0 → async_universalis-4.1.0.dev0}/async_universalis/__init__.py +20 -8
  3. {async_universalis-4.0.2.dev0 → async_universalis-4.1.0.dev0/async_universalis.egg-info}/PKG-INFO +1 -1
  4. {async_universalis-4.0.2.dev0 → async_universalis-4.1.0.dev0}/LICENSE +0 -0
  5. {async_universalis-4.0.2.dev0 → async_universalis-4.1.0.dev0}/MANIFEST.in +0 -0
  6. {async_universalis-4.0.2.dev0 → async_universalis-4.1.0.dev0}/README.md +0 -0
  7. {async_universalis-4.0.2.dev0 → async_universalis-4.1.0.dev0}/async_universalis/_enums.py +0 -0
  8. {async_universalis-4.0.2.dev0 → async_universalis-4.1.0.dev0}/async_universalis/_types.py +0 -0
  9. {async_universalis-4.0.2.dev0 → async_universalis-4.1.0.dev0}/async_universalis/errors.py +0 -0
  10. {async_universalis-4.0.2.dev0 → async_universalis-4.1.0.dev0}/async_universalis/items.json +0 -0
  11. {async_universalis-4.0.2.dev0 → async_universalis-4.1.0.dev0}/async_universalis/py.typed +0 -0
  12. {async_universalis-4.0.2.dev0 → async_universalis-4.1.0.dev0}/async_universalis.egg-info/SOURCES.txt +0 -0
  13. {async_universalis-4.0.2.dev0 → async_universalis-4.1.0.dev0}/async_universalis.egg-info/dependency_links.txt +0 -0
  14. {async_universalis-4.0.2.dev0 → async_universalis-4.1.0.dev0}/async_universalis.egg-info/requires.txt +0 -0
  15. {async_universalis-4.0.2.dev0 → async_universalis-4.1.0.dev0}/async_universalis.egg-info/top_level.txt +0 -0
  16. {async_universalis-4.0.2.dev0 → async_universalis-4.1.0.dev0}/pyproject.toml +0 -0
  17. {async_universalis-4.0.2.dev0 → async_universalis-4.1.0.dev0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: async_universalis
3
- Version: 4.0.2.dev0
3
+ Version: 4.1.0.dev0
4
4
  Summary: A bare-bones wrapper package to utilitize Universalis API in python.
5
5
  Author-email: k8thekat <Cadwalladerkatelynn@gmail.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -23,7 +23,7 @@ from __future__ import annotations
23
23
  __title__ = "Universalis API wrapper"
24
24
  __author__ = "k8thekat"
25
25
  __license__ = "GNU"
26
- __version__ = "4.0.2-dev"
26
+ __version__ = "4.1.0-dev"
27
27
  __credits__ = "Universalis and Square Enix"
28
28
 
29
29
 
@@ -721,8 +721,8 @@ class Generic:
721
721
 
722
722
  world_id: Optional[int]
723
723
  # world_name: Optional[str]
724
- # This value only exists if you look up results by "Datacenter" instead of "World"
725
724
  dc_name: Optional[str]
725
+ "This value only exists if you look up results by `Datacenter` instead of `World`"
726
726
  _raw: DataTypedAliase | MultiPartData
727
727
 
728
728
  def __init__(self, data: DataTypedAliase | MultiPartData) -> None:
@@ -933,6 +933,7 @@ class CurrentData(GenericData):
933
933
  self._universalis = universalis
934
934
  self._repr_keys = [
935
935
  "world_name",
936
+ "dc_name",
936
937
  "last_upload_time",
937
938
  "item_id",
938
939
  "regular_sale_velocity",
@@ -950,6 +951,7 @@ class CurrentData(GenericData):
950
951
  # We get it early here, as the for loop won't set it to `None` if the data isn't there.
951
952
  # This is being used for `CurrentDataEntries` as fetching "world" data doesn't provide the field to `listings`.
952
953
  self.world_name = data.get("worldName", None)
954
+ self.dc_name = data.get("dcName", None)
953
955
 
954
956
  for key_, value in data.items():
955
957
  key = UniversalisAPI.from_camel_case(key_name=key_)
@@ -975,7 +977,9 @@ class CurrentData(GenericData):
975
977
 
976
978
  @listings.setter
977
979
  def listings(self, value: list[CurrentListing]) -> None:
978
- self._listings: list[CurrentDataEntries] = sorted([CurrentDataEntries(data=entry, world_name=self.world_name) for entry in value])
980
+ self._listings: list[CurrentDataEntries] = sorted([
981
+ CurrentDataEntries(data=entry, world_name=self.world_name, dc_name=self.dc_name) for entry in value
982
+ ])
979
983
 
980
984
  @property
981
985
  def recent_history(self) -> list[HistoryDataEntries]:
@@ -984,7 +988,9 @@ class CurrentData(GenericData):
984
988
 
985
989
  @recent_history.setter
986
990
  def recent_history(self, value: list[HistoryEntries]) -> None:
987
- self._recent_history: list[HistoryDataEntries] = sorted([HistoryDataEntries(data=entry) for entry in value])
991
+ self._recent_history: list[HistoryDataEntries] = sorted([
992
+ HistoryDataEntries(data=entry, world_name=self.world_name, dc_name=self.dc_name) for entry in value
993
+ ])
988
994
 
989
995
 
990
996
  class CurrentDataEntries(Generic):
@@ -1064,7 +1070,7 @@ class CurrentDataEntries(Generic):
1064
1070
  _last_review_time: datetime.datetime | int
1065
1071
  _materia: int
1066
1072
 
1067
- def __init__(self, data: CurrentListing, *, world_name: Optional[str] = None) -> None:
1073
+ def __init__(self, data: CurrentListing, *, world_name: Optional[str] = None, dc_name: Optional[str] = None) -> None:
1068
1074
  """Build your JSON response :class:`CurrentDataEntries`.
1069
1075
 
1070
1076
  Represents the data from property `<CurrentData>.listings`.
@@ -1075,12 +1081,15 @@ class CurrentDataEntries(Generic):
1075
1081
  The JSON response data as a dict.
1076
1082
  world_name: :class:`Optional[str]`
1077
1083
  The Final Fantasy 14 World name, if applicable.
1084
+ dc_name: :class:`Optional[str]`
1085
+ The Final Fantasy 14 DataCenter name, if applicable.
1078
1086
 
1079
1087
  """
1080
1088
  super().__init__(data=data)
1081
- self._repr_keys = ["world_name", "price_per_unit", "quantity", "hq", "materia", "total", "tax"]
1089
+ self._repr_keys = ["world_name", "dc_name", "price_per_unit", "quantity", "hq", "materia", "total", "tax"]
1082
1090
 
1083
1091
  self.world_name = world_name
1092
+ self.dc_name = dc_name
1084
1093
  for key_, value in data.items():
1085
1094
  key = UniversalisAPI.from_camel_case(key_name=key_)
1086
1095
  if key.lower() in {"on_mannequin", "is_crafted", "hq"} and isinstance(value, int):
@@ -1304,7 +1313,7 @@ class HistoryDataEntries(Generic):
1304
1313
  world_id: Optional[int]
1305
1314
  _timestamp: datetime.datetime | int
1306
1315
 
1307
- def __init__(self, data: HistoryEntries, *, world_name: Optional[str] = None) -> None:
1316
+ def __init__(self, data: HistoryEntries, *, world_name: Optional[str] = None, dc_name: Optional[str] = None) -> None:
1308
1317
  """Build your JSON response :class:`HistoryDataEntries`.
1309
1318
 
1310
1319
  Represents the data from property `<HistoryData>.entries` and `<CurrentData>.recent_history`.
@@ -1315,11 +1324,14 @@ class HistoryDataEntries(Generic):
1315
1324
  The JSON response data as a dict.
1316
1325
  world_name: :class:`Optional[str]`
1317
1326
  The Final Fantasy 14 World name, if applicable.
1327
+ dc_name: :class:`Optional[str]`
1328
+ The Final Fantasy 14 DataCenter name, if applicable.
1318
1329
 
1319
1330
  """
1320
1331
  super().__init__(data=data)
1321
- self._repr_keys = ["world_name", "timestamp", "quantity", "price_per_unit", "hq"]
1332
+ self._repr_keys = ["world_name", "dc_name", "timestamp", "quantity", "price_per_unit", "hq"]
1322
1333
  self.world_name = world_name
1334
+ self.dc_name = dc_name
1323
1335
 
1324
1336
  for key_, value in data.items():
1325
1337
  key: str = UniversalisAPI.from_camel_case(key_name=key_)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: async_universalis
3
- Version: 4.0.2.dev0
3
+ Version: 4.1.0.dev0
4
4
  Summary: A bare-bones wrapper package to utilitize Universalis API in python.
5
5
  Author-email: k8thekat <Cadwalladerkatelynn@gmail.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE