async-universalis 5.0.0.dev0__tar.gz → 5.0.1.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.
- {async_universalis-5.0.0.dev0/async_universalis.egg-info → async_universalis-5.0.1.dev0}/PKG-INFO +2 -2
- {async_universalis-5.0.0.dev0 → async_universalis-5.0.1.dev0}/README.md +1 -1
- {async_universalis-5.0.0.dev0 → async_universalis-5.0.1.dev0}/async_universalis/__init__.py +10 -13
- {async_universalis-5.0.0.dev0 → async_universalis-5.0.1.dev0/async_universalis.egg-info}/PKG-INFO +2 -2
- {async_universalis-5.0.0.dev0 → async_universalis-5.0.1.dev0}/LICENSE +0 -0
- {async_universalis-5.0.0.dev0 → async_universalis-5.0.1.dev0}/MANIFEST.in +0 -0
- {async_universalis-5.0.0.dev0 → async_universalis-5.0.1.dev0}/async_universalis/_enums.py +0 -0
- {async_universalis-5.0.0.dev0 → async_universalis-5.0.1.dev0}/async_universalis/_types.py +0 -0
- {async_universalis-5.0.0.dev0 → async_universalis-5.0.1.dev0}/async_universalis/errors.py +0 -0
- {async_universalis-5.0.0.dev0 → async_universalis-5.0.1.dev0}/async_universalis/items.json +0 -0
- {async_universalis-5.0.0.dev0 → async_universalis-5.0.1.dev0}/async_universalis/py.typed +0 -0
- {async_universalis-5.0.0.dev0 → async_universalis-5.0.1.dev0}/async_universalis.egg-info/SOURCES.txt +0 -0
- {async_universalis-5.0.0.dev0 → async_universalis-5.0.1.dev0}/async_universalis.egg-info/dependency_links.txt +0 -0
- {async_universalis-5.0.0.dev0 → async_universalis-5.0.1.dev0}/async_universalis.egg-info/requires.txt +0 -0
- {async_universalis-5.0.0.dev0 → async_universalis-5.0.1.dev0}/async_universalis.egg-info/top_level.txt +0 -0
- {async_universalis-5.0.0.dev0 → async_universalis-5.0.1.dev0}/pyproject.toml +0 -0
- {async_universalis-5.0.0.dev0 → async_universalis-5.0.1.dev0}/setup.cfg +0 -0
{async_universalis-5.0.0.dev0/async_universalis.egg-info → async_universalis-5.0.1.dev0}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: async_universalis
|
|
3
|
-
Version: 5.0.
|
|
3
|
+
Version: 5.0.1.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
|
|
@@ -712,7 +712,7 @@ A simple and light weight wrapper for [Universalis](https://universalis.app) mar
|
|
|
712
712
|
|
|
713
713
|
## Currently Supported Endpoints
|
|
714
714
|
|
|
715
|
-
- https://docs.universalis.app/#current-
|
|
715
|
+
- https://docs.universalis.app/#market-board-current-data
|
|
716
716
|
- `UniversalisAPI.get_current_data()` and `UniversalisAPI.get_bulk_current_data()`
|
|
717
717
|
- https://docs.universalis.app/#market-board-sale-history
|
|
718
718
|
- `UniversalisAPI.get_history_data()` and `UniversalisAPI.get_bulk_history_data()`
|
|
@@ -13,7 +13,7 @@ A simple and light weight wrapper for [Universalis](https://universalis.app) mar
|
|
|
13
13
|
|
|
14
14
|
## Currently Supported Endpoints
|
|
15
15
|
|
|
16
|
-
- https://docs.universalis.app/#current-
|
|
16
|
+
- https://docs.universalis.app/#market-board-current-data
|
|
17
17
|
- `UniversalisAPI.get_current_data()` and `UniversalisAPI.get_bulk_current_data()`
|
|
18
18
|
- https://docs.universalis.app/#market-board-sale-history
|
|
19
19
|
- `UniversalisAPI.get_history_data()` and `UniversalisAPI.get_bulk_history_data()`
|
|
@@ -23,7 +23,7 @@ from __future__ import annotations
|
|
|
23
23
|
__title__ = "Universalis API wrapper"
|
|
24
24
|
__author__ = "k8thekat"
|
|
25
25
|
__license__ = "GNU"
|
|
26
|
-
__version__ = "5.0.
|
|
26
|
+
__version__ = "5.0.1-dev"
|
|
27
27
|
__credits__ = "Universalis and Square Enix"
|
|
28
28
|
|
|
29
29
|
|
|
@@ -268,7 +268,6 @@ class UniversalisAPI:
|
|
|
268
268
|
world_or_dc: Optional[DataCenter | World] = None,
|
|
269
269
|
num_listings: int = 10,
|
|
270
270
|
num_history_entries: int = 10,
|
|
271
|
-
# item_quality: ItemQuality = ItemQuality.NQ,
|
|
272
271
|
item_quality: Literal["HQ", "NQ"] = "NQ",
|
|
273
272
|
trim_item_fields: bool = False,
|
|
274
273
|
) -> CurrentData:
|
|
@@ -276,7 +275,7 @@ class UniversalisAPI:
|
|
|
276
275
|
|
|
277
276
|
Retrieves the data currently shown on the market board for the requested item and world or data center.
|
|
278
277
|
|
|
279
|
-
API: https://docs.universalis.app/#current-
|
|
278
|
+
API: https://docs.universalis.app/#market-board-current-data
|
|
280
279
|
|
|
281
280
|
.. note::
|
|
282
281
|
If you want to modify the returned data fields, access `<UniversalisAPI>.single_item_fields` property and change the format.
|
|
@@ -323,9 +322,9 @@ class UniversalisAPI:
|
|
|
323
322
|
if world_or_dc is None:
|
|
324
323
|
world_or_dc = self.default_datacenter
|
|
325
324
|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
325
|
+
quality = 1 if item_quality == "HQ" else 0
|
|
326
|
+
|
|
327
|
+
api_url: str = f"{self.base_api_url}/{world_or_dc.name}/{item}?listings={num_listings}&entries={num_history_entries}&hq={quality}"
|
|
329
328
|
# ? Suggestion
|
|
330
329
|
# A fields class to handle querys.
|
|
331
330
|
# If we need/want to trim fields.
|
|
@@ -425,12 +424,12 @@ class UniversalisAPI:
|
|
|
425
424
|
trim_item_fields=trim_item_fields,
|
|
426
425
|
)
|
|
427
426
|
|
|
428
|
-
|
|
427
|
+
quality = 1 if item_quality == "HQ" else 0
|
|
429
428
|
data: Optional[MultiPart] = None
|
|
430
429
|
for idx in range(0, len(query), 100):
|
|
431
430
|
api_url: str = (
|
|
432
431
|
f"{self.base_api_url}/{world_or_dc.name}/{','.join(query[idx : idx + 100])}?listings={num_listings}"
|
|
433
|
-
f"&entries={num_history_entries}&hq={
|
|
432
|
+
f"&entries={num_history_entries}&hq={quality}"
|
|
434
433
|
)
|
|
435
434
|
# If we need/want to trim fields.
|
|
436
435
|
if trim_item_fields:
|
|
@@ -748,8 +747,8 @@ class Generic:
|
|
|
748
747
|
continue
|
|
749
748
|
# Should handle basic formatting on any large numbers without impacting data manipulation.
|
|
750
749
|
if isinstance(value, float):
|
|
751
|
-
value = f"{value
|
|
752
|
-
temp += f"{entry}: {value}"
|
|
750
|
+
value = f"{value:,.0f}"
|
|
751
|
+
temp += f"{entry}: {value}\n"
|
|
753
752
|
return temp
|
|
754
753
|
|
|
755
754
|
# return f"\n\n__{self.__class__.__name__}__\n" + "\n".join([
|
|
@@ -1160,9 +1159,7 @@ class CurrentDataEntries(Generic):
|
|
|
1160
1159
|
If `<CurrentDataEntries>.listing_id` is equal to `<object>.listing_id`.
|
|
1161
1160
|
|
|
1162
1161
|
"""
|
|
1163
|
-
return (
|
|
1164
|
-
isinstance(other, self.__class__) and self.listing_id == other.listing_id
|
|
1165
|
-
) # and self.price_per_unit == other.price_per_unit
|
|
1162
|
+
return isinstance(other, self.__class__) and self.listing_id == other.listing_id # and self.price_per_unit == other.price_per_unit
|
|
1166
1163
|
|
|
1167
1164
|
def __lt__(self, other: object) -> bool:
|
|
1168
1165
|
"""Comapres the `<object>.hq` attribute to `self.hq` and `<object>.last_review_time` > `self.last_review_time`.
|
{async_universalis-5.0.0.dev0 → async_universalis-5.0.1.dev0/async_universalis.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: async_universalis
|
|
3
|
-
Version: 5.0.
|
|
3
|
+
Version: 5.0.1.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
|
|
@@ -712,7 +712,7 @@ A simple and light weight wrapper for [Universalis](https://universalis.app) mar
|
|
|
712
712
|
|
|
713
713
|
## Currently Supported Endpoints
|
|
714
714
|
|
|
715
|
-
- https://docs.universalis.app/#current-
|
|
715
|
+
- https://docs.universalis.app/#market-board-current-data
|
|
716
716
|
- `UniversalisAPI.get_current_data()` and `UniversalisAPI.get_bulk_current_data()`
|
|
717
717
|
- https://docs.universalis.app/#market-board-sale-history
|
|
718
718
|
- `UniversalisAPI.get_history_data()` and `UniversalisAPI.get_bulk_history_data()`
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{async_universalis-5.0.0.dev0 → async_universalis-5.0.1.dev0}/async_universalis.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|