foxapi 2.1.0__tar.gz → 2.1.1__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.
- {foxapi-2.1.0 → foxapi-2.1.1}/PKG-INFO +1 -1
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/__init__.py +1 -1
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/objects.py +10 -65
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi.egg-info/PKG-INFO +1 -1
- {foxapi-2.1.0 → foxapi-2.1.1}/LICENSE +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/README.md +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/10.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/11.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/12.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/13.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/14.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/15.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/16.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/17.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/18.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/19.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/20.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/21.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/22.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/23.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/27.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/28.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/29.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/30.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/32.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/33.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/34.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/35.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/36.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/37.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/38.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/39.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/40.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/41.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/45.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/46.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/47.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/5.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/51.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/52.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/53.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/54.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/56.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/57.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/58.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/59.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/6.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/60.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/61.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/62.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/7.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/70.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/71.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/72.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/75.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/8.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/83.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/84.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/88.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/89.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/9.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/90.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/91.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/92.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/DebugIcon.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/MapIconCivicCenter.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/MapIconHomeBaseHallColonial.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/MapIconHomeBaseHallWarden.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/MapIconScorchedTown.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/MapIconTownHall.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapIcons/MapIconVictory.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/FoxholeFestivalMapHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapAcrithiaHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapAllodsBightHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapAshFieldsHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapBasinSionnachHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapCallahansPassageHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapCallumsCapeHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapClahstraHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapClansheadValleyHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapDeadLandsHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapDrownedValeHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapEndlessShoreHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapFarranacCoastHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapFishermansRowHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapGodcroftsHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapGreatMarchHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapGutterHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapHeartlandsHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapHomeRegionC.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapHomeRegionW.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapHowlCountyHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapKalokaiHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapKingsCageHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapKuuraStrandHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapLinnMercyHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapLochMorHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapLykosIsleHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapMarbanHollowHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapMooringCountyHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapMorgensCrossingHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapNevishLineHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapOarbreakerHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapOlavisWakeHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapOnyxHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapOriginHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapPalantineBermHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapPariPeakHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapPipersEnclaveHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapReachingTrailHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapReaversPassHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapRedRiverHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapSableportHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapShackledChasmHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapSpeakingWoodsHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapStemaLandingHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapStlicanShelfHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapStonecradleHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapTempestIslandHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapTerminusHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapTheFingersHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapTyrantFoothillsHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapUmbralWildwoodHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapViperPitHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapWeatheredExpanseHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapWestgateHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/Images/MapsHex/MapWrestaHex.png +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/foxapi.py +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi/utils.py +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi.egg-info/SOURCES.txt +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi.egg-info/dependency_links.txt +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi.egg-info/requires.txt +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/foxapi.egg-info/top_level.txt +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/setup.cfg +0 -0
- {foxapi-2.1.0 → foxapi-2.1.1}/setup.py +0 -0
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import inspect
|
|
2
|
-
|
|
3
1
|
class FoxObject:
|
|
4
2
|
pass
|
|
5
3
|
|
|
@@ -9,73 +7,20 @@ class FoxObject(dict):
|
|
|
9
7
|
Universal wrapper for any kind of dict item
|
|
10
8
|
if the data structure change I won't have to do
|
|
11
9
|
massive change in the code
|
|
12
|
-
|
|
10
|
+
"""
|
|
13
11
|
def __init__(self, dico: dict):
|
|
12
|
+
|
|
14
13
|
for k, v in dico.items():
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"""
|
|
20
|
-
|
|
21
|
-
def __repr__(self):
|
|
22
|
-
return str({k: v for k, v in self.__dict__.items()})
|
|
23
|
-
|
|
24
|
-
def __getitem__(self, item: str | int):
|
|
25
|
-
data = None
|
|
26
|
-
|
|
27
|
-
if isinstance(item, str):
|
|
28
|
-
data = getattr(self, item)
|
|
29
|
-
|
|
30
|
-
if isinstance(data, list):
|
|
31
|
-
if data and isinstance(data[0], FoxObject):
|
|
32
|
-
caller = inspect.stack()[1]
|
|
33
|
-
code = inspect.getsource(caller.frame).split("\n")[caller.lineno-1]
|
|
34
|
-
|
|
35
|
-
if "]." not in code:
|
|
36
|
-
return [d.json for d in data]
|
|
37
|
-
|
|
38
|
-
return data
|
|
14
|
+
self.__setitem__(k, v)
|
|
15
|
+
|
|
16
|
+
def __setattr__(self, k, v):
|
|
17
|
+
super().__setitem__(k, FoxObject(v))
|
|
39
18
|
|
|
19
|
+
def __getattr__(self, k):
|
|
20
|
+
return super().get(k)
|
|
21
|
+
|
|
40
22
|
def __setitem__(self, k, v):
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
def __iter__(self):
|
|
44
|
-
for k, v in self.__dict__.items():
|
|
45
|
-
yield str(k), v
|
|
46
|
-
|
|
47
|
-
def items(self):
|
|
48
|
-
return self.__dict__.items()
|
|
49
|
-
|
|
50
|
-
def get(self, item, default=None):
|
|
51
|
-
data = getattr(self, item)
|
|
52
|
-
|
|
53
|
-
if data is None:
|
|
54
|
-
return default
|
|
55
|
-
|
|
56
|
-
return data
|
|
57
|
-
|
|
58
|
-
@property
|
|
59
|
-
def json(self):
|
|
60
|
-
ignore: list = ["response"]
|
|
61
|
-
|
|
62
|
-
dico: dict = {}
|
|
63
|
-
|
|
64
|
-
for k, v in self.__dict__.items():
|
|
65
|
-
if k in ignore:
|
|
66
|
-
continue
|
|
67
|
-
|
|
68
|
-
if isinstance(v, list):
|
|
69
|
-
if v and isinstance(v[0], FoxObject):
|
|
70
|
-
dico[k] = [d.json for d in v]
|
|
71
|
-
|
|
72
|
-
else:
|
|
73
|
-
dico[k] = v
|
|
74
|
-
|
|
75
|
-
else:
|
|
76
|
-
dico[k] = v
|
|
77
|
-
|
|
78
|
-
return dico
|
|
23
|
+
super().__setitem__(k, FoxObject(v))
|
|
79
24
|
|
|
80
25
|
|
|
81
26
|
class APIObject(FoxObject):
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|