foxapi 1.3.3__tar.gz → 1.4.2__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-1.3.3 → foxapi-1.4.2}/PKG-INFO +47 -1
- {foxapi-1.3.3 → foxapi-1.4.2}/README.md +45 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/foxapi.py +42 -11
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/utils.py +53 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi.egg-info/PKG-INFO +47 -1
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi.egg-info/requires.txt +1 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/setup.py +2 -1
- {foxapi-1.3.3 → foxapi-1.4.2}/LICENSE +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/10.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/11.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/11COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/11WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/12.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/12COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/12WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/13.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/14.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/15.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/16.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/17.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/17COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/17WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/18.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/18COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/18WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/19.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/19COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/19WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/20.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/21.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/22.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/23.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/27.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/27COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/27WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/28.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/28COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/28WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/29.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/29COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/29WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/30.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/30COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/30WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/32.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/33.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/33COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/33WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/34.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/34COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/34WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/35.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/35COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/35WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/37.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/37COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/37WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/38.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/39.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/39COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/39WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/40.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/41.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/45.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/45COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/45WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/46.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/46COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/46WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/47.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/47COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/47WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/5.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/51.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/51COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/51WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/52.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/52COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/52WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/53.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/53COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/53WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/54.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/56.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/56COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/56WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/57.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/57COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/57WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/58.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/58COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/58WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/59COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/59WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/5COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/5WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/6.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/60COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/60WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/61.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/62.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/6COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/6WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/7.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/75.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/75COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/75WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/7COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/7WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/8.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/84COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/84WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/8COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/8WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/9.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/9COLONIALS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/9WARDENS.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/DebugIcon.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/MapIconCivicCenter.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/MapIconCoalFieldColor.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/MapIconFortCursed.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/MapIconHomeBaseHallColonial.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/MapIconHomeBaseHallWarden.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/MapIconOilFieldColor.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/MapIconSafehouse.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/MapIconScorchedTown.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/MapIconSulfurColor.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/MapIconTownHall.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/MapIconTownHallColonial.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/MapIconTownHallWarden.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/MapIconVictory.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/MapIconVictoryColonial.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapIcons/MapIconVictoryWarden.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapAcrithiaHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapAllodsBightHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapAshFieldsHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapBasinSionnachHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapCallahansPassageHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapCallumsCapeHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapClahstraHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapClansheadValleyHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapDeadLandsHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapDrownedValeHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapEndlessShoreHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapFarranacCoastHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapFishermansRowHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapGodcroftsHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapGreatMarchHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapHeartlandsHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapHomeRegionC.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapHomeRegionW.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapHowlCountyHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapKalokaiHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapKingsCageHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapLinnMercyHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapLochMorHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapMarbanHollow.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapMooringCountyHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapMorgensCrossingHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapNevishLineHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapOarbreakerHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapOriginHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapReachingTrailHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapReaversPassHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapRedRiverHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapSableportHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapShackledChasmHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapSpeakingWoodsHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapStemaLandingHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapStlicanShelfHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapStonecradleHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapTempestIslandHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapTerminusHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapTheFingersHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapUmbralWildwoodHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapViperPitHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapWeatheredExpanseHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/Images/MapsHex/MapWestgateHex.png +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi/__init__.py +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi.egg-info/SOURCES.txt +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi.egg-info/dependency_links.txt +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/foxapi.egg-info/top_level.txt +0 -0
- {foxapi-1.3.3 → foxapi-1.4.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: foxapi
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.2
|
|
4
4
|
Summary: A wrapper for the foxhole API
|
|
5
5
|
Home-page: https://github.com/ThePhoenix78/FoxAPI
|
|
6
6
|
Download-URL: https://github.com/ThePhoenix78/FoxAPI/tarball/master
|
|
@@ -15,6 +15,7 @@ Description-Content-Type: text/markdown
|
|
|
15
15
|
License-File: LICENSE
|
|
16
16
|
Requires-Dist: requests
|
|
17
17
|
Requires-Dist: pillow
|
|
18
|
+
Requires-Dist: aiohttp
|
|
18
19
|
Dynamic: author
|
|
19
20
|
Dynamic: author-email
|
|
20
21
|
Dynamic: classifier
|
|
@@ -49,6 +50,7 @@ Also, if you work with discord.py or any asynchronous API, this tool might be us
|
|
|
49
50
|
- [Map and War Data](#map-and-war-data)
|
|
50
51
|
- [Hexagon Operations](#hexagon-operations)
|
|
51
52
|
- [Listener Functions](#listener-functions)
|
|
53
|
+
- [Queue Tasks](#queue-tasks)
|
|
52
54
|
- [Error Handling](#error-handling)
|
|
53
55
|
- [Objects](#objects)
|
|
54
56
|
- [Example Usage](#example-usage)
|
|
@@ -160,6 +162,43 @@ on_hexagon_update(callback: callable = None, hexagons: list = "all")
|
|
|
160
162
|
```
|
|
161
163
|
- Registers a callback function to be called when the data for specified hexagons is updated.
|
|
162
164
|
|
|
165
|
+
|
|
166
|
+
### Queue Tasks
|
|
167
|
+
|
|
168
|
+
This library also give the possibility to queue up some sync and async methods to run them simultaneously
|
|
169
|
+
|
|
170
|
+
```py
|
|
171
|
+
from foxapi import FoxAPI
|
|
172
|
+
|
|
173
|
+
api = FoxAPI()
|
|
174
|
+
|
|
175
|
+
for i in range(10):
|
|
176
|
+
api.add_task(function=api.get_war) # or any other method
|
|
177
|
+
|
|
178
|
+
data = api.run_task_sync()
|
|
179
|
+
|
|
180
|
+
for elem in data:
|
|
181
|
+
print(elem.result)
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
```py
|
|
185
|
+
from foxapi import FoxAPI
|
|
186
|
+
import asyncio
|
|
187
|
+
|
|
188
|
+
api = FoxAPI()
|
|
189
|
+
|
|
190
|
+
async def main():
|
|
191
|
+
for i in range(10):
|
|
192
|
+
api.add_task(function=api.get_war) # or any other method
|
|
193
|
+
|
|
194
|
+
data = await api.run_task()
|
|
195
|
+
|
|
196
|
+
for elem in data:
|
|
197
|
+
print(elem.result)
|
|
198
|
+
|
|
199
|
+
asyncio.run(main())
|
|
200
|
+
```
|
|
201
|
+
|
|
163
202
|
## Error Handling
|
|
164
203
|
|
|
165
204
|
```pyEndpointError```: Raised if an invalid API endpoint is used.
|
|
@@ -170,6 +209,13 @@ on_hexagon_update(callback: callable = None, hexagons: list = "all")
|
|
|
170
209
|
## Objects
|
|
171
210
|
|
|
172
211
|
```python
|
|
212
|
+
class Task:
|
|
213
|
+
def __init__(self, function: callable, args: any = "no_args", result: any = None):
|
|
214
|
+
self.function: callable = function
|
|
215
|
+
self.args: any = args
|
|
216
|
+
self.result: any = result
|
|
217
|
+
|
|
218
|
+
|
|
173
219
|
class APIResponse:
|
|
174
220
|
def __init__(self, headers: dict, json: dict, status_code: int, hexagon: str, is_use_cache: bool):
|
|
175
221
|
self.headers: dict = headers
|
|
@@ -20,6 +20,7 @@ Also, if you work with discord.py or any asynchronous API, this tool might be us
|
|
|
20
20
|
- [Map and War Data](#map-and-war-data)
|
|
21
21
|
- [Hexagon Operations](#hexagon-operations)
|
|
22
22
|
- [Listener Functions](#listener-functions)
|
|
23
|
+
- [Queue Tasks](#queue-tasks)
|
|
23
24
|
- [Error Handling](#error-handling)
|
|
24
25
|
- [Objects](#objects)
|
|
25
26
|
- [Example Usage](#example-usage)
|
|
@@ -131,6 +132,43 @@ on_hexagon_update(callback: callable = None, hexagons: list = "all")
|
|
|
131
132
|
```
|
|
132
133
|
- Registers a callback function to be called when the data for specified hexagons is updated.
|
|
133
134
|
|
|
135
|
+
|
|
136
|
+
### Queue Tasks
|
|
137
|
+
|
|
138
|
+
This library also give the possibility to queue up some sync and async methods to run them simultaneously
|
|
139
|
+
|
|
140
|
+
```py
|
|
141
|
+
from foxapi import FoxAPI
|
|
142
|
+
|
|
143
|
+
api = FoxAPI()
|
|
144
|
+
|
|
145
|
+
for i in range(10):
|
|
146
|
+
api.add_task(function=api.get_war) # or any other method
|
|
147
|
+
|
|
148
|
+
data = api.run_task_sync()
|
|
149
|
+
|
|
150
|
+
for elem in data:
|
|
151
|
+
print(elem.result)
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
```py
|
|
155
|
+
from foxapi import FoxAPI
|
|
156
|
+
import asyncio
|
|
157
|
+
|
|
158
|
+
api = FoxAPI()
|
|
159
|
+
|
|
160
|
+
async def main():
|
|
161
|
+
for i in range(10):
|
|
162
|
+
api.add_task(function=api.get_war) # or any other method
|
|
163
|
+
|
|
164
|
+
data = await api.run_task()
|
|
165
|
+
|
|
166
|
+
for elem in data:
|
|
167
|
+
print(elem.result)
|
|
168
|
+
|
|
169
|
+
asyncio.run(main())
|
|
170
|
+
```
|
|
171
|
+
|
|
134
172
|
## Error Handling
|
|
135
173
|
|
|
136
174
|
```pyEndpointError```: Raised if an invalid API endpoint is used.
|
|
@@ -141,6 +179,13 @@ on_hexagon_update(callback: callable = None, hexagons: list = "all")
|
|
|
141
179
|
## Objects
|
|
142
180
|
|
|
143
181
|
```python
|
|
182
|
+
class Task:
|
|
183
|
+
def __init__(self, function: callable, args: any = "no_args", result: any = None):
|
|
184
|
+
self.function: callable = function
|
|
185
|
+
self.args: any = args
|
|
186
|
+
self.result: any = result
|
|
187
|
+
|
|
188
|
+
|
|
144
189
|
class APIResponse:
|
|
145
190
|
def __init__(self, headers: dict, json: dict, status_code: int, hexagon: str, is_use_cache: bool):
|
|
146
191
|
self.headers: dict = headers
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
try:
|
|
2
|
-
from .utils import HexagonObject, FoxAPIError, HexagonError, EndpointError, APIResponse
|
|
2
|
+
from .utils import HexagonObject, FoxAPIError, HexagonError, EndpointError, APIResponse, Task
|
|
3
3
|
except ImportError:
|
|
4
|
-
from utils import HexagonObject, FoxAPIError, HexagonError, EndpointError, APIResponse
|
|
4
|
+
from utils import HexagonObject, FoxAPIError, HexagonError, EndpointError, APIResponse, Task
|
|
5
5
|
|
|
6
6
|
from pathlib import Path
|
|
7
7
|
from PIL import Image
|
|
@@ -216,32 +216,32 @@ class FoxAPI():
|
|
|
216
216
|
"""
|
|
217
217
|
|
|
218
218
|
async def get_maps(self, use_cache: bool = True):
|
|
219
|
-
data = await self.get_data(endpoint="/maps", use_cache=use_cache)
|
|
219
|
+
data: APIResponse = await self.get_data(endpoint="/maps", use_cache=use_cache)
|
|
220
220
|
return data.json
|
|
221
221
|
|
|
222
222
|
async def get_war(self, use_cache: bool = False):
|
|
223
|
-
data = await self.get_data(endpoint="/war", use_cache=use_cache)
|
|
223
|
+
data: APIResponse = await self.get_data(endpoint="/war", use_cache=use_cache)
|
|
224
224
|
return data.json
|
|
225
225
|
|
|
226
226
|
async def get_static(self, hexagon: str, use_cache: bool = False):
|
|
227
227
|
if self._safe_mode:
|
|
228
228
|
hexagon: str = self._format_hexagon(hexagon)
|
|
229
229
|
|
|
230
|
-
data = await self.get_data(endpoint=f"/maps/{hexagon}/static", use_cache=use_cache)
|
|
230
|
+
data: APIResponse = await self.get_data(endpoint=f"/maps/{hexagon}/static", use_cache=use_cache)
|
|
231
231
|
return data.json
|
|
232
232
|
|
|
233
233
|
async def get_dynamic(self, hexagon: str, use_cache: bool = False):
|
|
234
234
|
if self._safe_mode:
|
|
235
235
|
hexagon: str = self._format_hexagon(hexagon)
|
|
236
236
|
|
|
237
|
-
data = await self.get_data(endpoint=f"/maps/{hexagon}/dynamic/public", use_cache=use_cache)
|
|
237
|
+
data: APIResponse = await self.get_data(endpoint=f"/maps/{hexagon}/dynamic/public", use_cache=use_cache)
|
|
238
238
|
return data.json
|
|
239
239
|
|
|
240
240
|
async def get_war_report(self, hexagon: str, use_cache: bool = False):
|
|
241
241
|
if self._safe_mode:
|
|
242
242
|
hexagon: str = self._format_hexagon(hexagon)
|
|
243
243
|
|
|
244
|
-
data = await self.get_data(endpoint=f"/warReport/{hexagon}", use_cache=use_cache)
|
|
244
|
+
data: APIResponse = await self.get_data(endpoint=f"/warReport/{hexagon}", use_cache=use_cache)
|
|
245
245
|
return data.json
|
|
246
246
|
|
|
247
247
|
"""
|
|
@@ -515,7 +515,7 @@ class FoxAPI():
|
|
|
515
515
|
"""
|
|
516
516
|
ASYNC TOOLS
|
|
517
517
|
"""
|
|
518
|
-
def add_task(self, function: callable, args:
|
|
518
|
+
def add_task(self, function: callable, args: any = "no_args"):
|
|
519
519
|
self.waiting_list.append([function, args])
|
|
520
520
|
|
|
521
521
|
async def run_task(self):
|
|
@@ -536,7 +536,7 @@ class FoxAPI():
|
|
|
536
536
|
tasks.append([asyncio.create_task(function(args)), function, args])
|
|
537
537
|
|
|
538
538
|
for task, function, args in tasks:
|
|
539
|
-
answers.append(
|
|
539
|
+
answers.append(Task(function=function, args=args, result=await task))
|
|
540
540
|
|
|
541
541
|
tasks.clear()
|
|
542
542
|
self.waiting_list.clear()
|
|
@@ -553,12 +553,43 @@ class FoxAPI():
|
|
|
553
553
|
def _exec(self):
|
|
554
554
|
return asyncio.run(self.run_task())
|
|
555
555
|
|
|
556
|
+
# https://gist.github.com/ultrafunkamsterdam/8be3d55ac45759aa1bd843ab64ce876d#file-python-3-6-asyncio-multiple-async-event-loops-in-multiple-threads-running-and-shutting-down-gracefully-py-L15
|
|
557
|
+
def create_bg_loop(self):
|
|
558
|
+
def to_bg(loop):
|
|
559
|
+
asyncio.set_event_loop(loop)
|
|
560
|
+
|
|
561
|
+
try:
|
|
562
|
+
loop.run_forever()
|
|
563
|
+
|
|
564
|
+
except asyncio.CancelledError as e:
|
|
565
|
+
print('CANCELLEDERROR {}'.format(e))
|
|
566
|
+
|
|
567
|
+
finally:
|
|
568
|
+
for task in asyncio.Task.all_tasks():
|
|
569
|
+
task.cancel()
|
|
570
|
+
|
|
571
|
+
loop.run_until_complete(loop.shutdown_asyncgens())
|
|
572
|
+
loop.stop()
|
|
573
|
+
loop.close()
|
|
574
|
+
|
|
575
|
+
new_loop = asyncio.new_event_loop()
|
|
576
|
+
t = threading.Thread(target=to_bg, args=(new_loop,))
|
|
577
|
+
t.start()
|
|
578
|
+
|
|
579
|
+
return new_loop
|
|
580
|
+
|
|
556
581
|
def start_async_thread(self, awaitable):
|
|
582
|
+
# old
|
|
583
|
+
"""
|
|
557
584
|
loop = asyncio.new_event_loop()
|
|
558
585
|
asyncio.set_event_loop(loop)
|
|
559
586
|
threading.Thread(target=loop.run_forever).start()
|
|
560
|
-
|
|
561
|
-
|
|
587
|
+
"""
|
|
588
|
+
# new
|
|
589
|
+
loop = self.create_bg_loop()
|
|
590
|
+
|
|
591
|
+
coro = asyncio.run_coroutine_threadsafe(awaitable, loop)
|
|
592
|
+
return loop, coro
|
|
562
593
|
|
|
563
594
|
def stop_async_thread(self, loop):
|
|
564
595
|
loop.call_soon_threadsafe(loop.stop)
|
|
@@ -68,6 +68,13 @@ class FoxAPIError(Exception):
|
|
|
68
68
|
pass
|
|
69
69
|
|
|
70
70
|
|
|
71
|
+
class Task:
|
|
72
|
+
def __init__(self, function: callable, args: any = "no_args", result: any = None):
|
|
73
|
+
self.function: callable = function
|
|
74
|
+
self.args: any = args
|
|
75
|
+
self.result: any = result
|
|
76
|
+
|
|
77
|
+
|
|
71
78
|
class APIResponse:
|
|
72
79
|
def __init__(self, headers: dict, json: dict, status_code: int, hexagon: str, is_cache: bool):
|
|
73
80
|
self.headers: dict = headers
|
|
@@ -86,3 +93,49 @@ class HexagonObject:
|
|
|
86
93
|
self.captured_towns: dict = captured_towns
|
|
87
94
|
self.casualty_rate: dict = casualty_rate
|
|
88
95
|
self.image = image
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
class FoxObject:
|
|
99
|
+
"""
|
|
100
|
+
Universal wrapper for any kind of dict item
|
|
101
|
+
if the data structure change I won't have to do
|
|
102
|
+
massive change in the code
|
|
103
|
+
"""
|
|
104
|
+
def __init__(self, dico: dict):
|
|
105
|
+
for k, v in dico.items():
|
|
106
|
+
if not isinstance(v, dict):
|
|
107
|
+
setattr(self, k, v)
|
|
108
|
+
else:
|
|
109
|
+
setattr(self, k, FoxObject(v))
|
|
110
|
+
|
|
111
|
+
def __repr__(self):
|
|
112
|
+
return str({k: v for k, v in self.__dict__.items()})
|
|
113
|
+
|
|
114
|
+
def __getitem__(self, x: str | int):
|
|
115
|
+
if isinstance(x, str):
|
|
116
|
+
return getattr(self, x)
|
|
117
|
+
|
|
118
|
+
def __setitem__(self, k, v):
|
|
119
|
+
setattr(self, k, v)
|
|
120
|
+
|
|
121
|
+
def items(self):
|
|
122
|
+
return self.__dict__.items()
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
class APIObject:
|
|
126
|
+
def __init__(self, api_response: APIResponse):
|
|
127
|
+
self.response: APIResponse = api_response
|
|
128
|
+
self.json: FoxObject = FoxObject(api_response.json)
|
|
129
|
+
|
|
130
|
+
def __repr__(self):
|
|
131
|
+
return str({k: v for k, v in self.json.__dict__.items()})
|
|
132
|
+
|
|
133
|
+
def __getitem__(self, x: str | int):
|
|
134
|
+
if isinstance(x, str):
|
|
135
|
+
return getattr(self.json, x)
|
|
136
|
+
|
|
137
|
+
def __setitem__(self, k, v):
|
|
138
|
+
setattr(self.json, k, v)
|
|
139
|
+
|
|
140
|
+
def items(self):
|
|
141
|
+
return self.json.__dict__.items()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: foxapi
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.2
|
|
4
4
|
Summary: A wrapper for the foxhole API
|
|
5
5
|
Home-page: https://github.com/ThePhoenix78/FoxAPI
|
|
6
6
|
Download-URL: https://github.com/ThePhoenix78/FoxAPI/tarball/master
|
|
@@ -15,6 +15,7 @@ Description-Content-Type: text/markdown
|
|
|
15
15
|
License-File: LICENSE
|
|
16
16
|
Requires-Dist: requests
|
|
17
17
|
Requires-Dist: pillow
|
|
18
|
+
Requires-Dist: aiohttp
|
|
18
19
|
Dynamic: author
|
|
19
20
|
Dynamic: author-email
|
|
20
21
|
Dynamic: classifier
|
|
@@ -49,6 +50,7 @@ Also, if you work with discord.py or any asynchronous API, this tool might be us
|
|
|
49
50
|
- [Map and War Data](#map-and-war-data)
|
|
50
51
|
- [Hexagon Operations](#hexagon-operations)
|
|
51
52
|
- [Listener Functions](#listener-functions)
|
|
53
|
+
- [Queue Tasks](#queue-tasks)
|
|
52
54
|
- [Error Handling](#error-handling)
|
|
53
55
|
- [Objects](#objects)
|
|
54
56
|
- [Example Usage](#example-usage)
|
|
@@ -160,6 +162,43 @@ on_hexagon_update(callback: callable = None, hexagons: list = "all")
|
|
|
160
162
|
```
|
|
161
163
|
- Registers a callback function to be called when the data for specified hexagons is updated.
|
|
162
164
|
|
|
165
|
+
|
|
166
|
+
### Queue Tasks
|
|
167
|
+
|
|
168
|
+
This library also give the possibility to queue up some sync and async methods to run them simultaneously
|
|
169
|
+
|
|
170
|
+
```py
|
|
171
|
+
from foxapi import FoxAPI
|
|
172
|
+
|
|
173
|
+
api = FoxAPI()
|
|
174
|
+
|
|
175
|
+
for i in range(10):
|
|
176
|
+
api.add_task(function=api.get_war) # or any other method
|
|
177
|
+
|
|
178
|
+
data = api.run_task_sync()
|
|
179
|
+
|
|
180
|
+
for elem in data:
|
|
181
|
+
print(elem.result)
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
```py
|
|
185
|
+
from foxapi import FoxAPI
|
|
186
|
+
import asyncio
|
|
187
|
+
|
|
188
|
+
api = FoxAPI()
|
|
189
|
+
|
|
190
|
+
async def main():
|
|
191
|
+
for i in range(10):
|
|
192
|
+
api.add_task(function=api.get_war) # or any other method
|
|
193
|
+
|
|
194
|
+
data = await api.run_task()
|
|
195
|
+
|
|
196
|
+
for elem in data:
|
|
197
|
+
print(elem.result)
|
|
198
|
+
|
|
199
|
+
asyncio.run(main())
|
|
200
|
+
```
|
|
201
|
+
|
|
163
202
|
## Error Handling
|
|
164
203
|
|
|
165
204
|
```pyEndpointError```: Raised if an invalid API endpoint is used.
|
|
@@ -170,6 +209,13 @@ on_hexagon_update(callback: callable = None, hexagons: list = "all")
|
|
|
170
209
|
## Objects
|
|
171
210
|
|
|
172
211
|
```python
|
|
212
|
+
class Task:
|
|
213
|
+
def __init__(self, function: callable, args: any = "no_args", result: any = None):
|
|
214
|
+
self.function: callable = function
|
|
215
|
+
self.args: any = args
|
|
216
|
+
self.result: any = result
|
|
217
|
+
|
|
218
|
+
|
|
173
219
|
class APIResponse:
|
|
174
220
|
def __init__(self, headers: dict, json: dict, status_code: int, hexagon: str, is_use_cache: bool):
|
|
175
221
|
self.headers: dict = headers
|
|
@@ -6,7 +6,7 @@ with open("README.md", "r") as stream:
|
|
|
6
6
|
|
|
7
7
|
setup(
|
|
8
8
|
name='foxapi',
|
|
9
|
-
version="1.
|
|
9
|
+
version="1.4.2",
|
|
10
10
|
url='https://github.com/ThePhoenix78/FoxAPI',
|
|
11
11
|
download_url='https://github.com/ThePhoenix78/FoxAPI/tarball/master',
|
|
12
12
|
license='MIT',
|
|
@@ -23,6 +23,7 @@ setup(
|
|
|
23
23
|
install_requires=[
|
|
24
24
|
'requests',
|
|
25
25
|
'pillow',
|
|
26
|
+
'aiohttp'
|
|
26
27
|
],
|
|
27
28
|
setup_requires=[
|
|
28
29
|
'wheel'
|
|
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
|
|
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
|