foxapi 1.3.2__tar.gz → 1.4.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.
- {foxapi-1.3.2 → foxapi-1.4.0}/PKG-INFO +46 -1
- {foxapi-1.3.2 → foxapi-1.4.0}/README.md +45 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/foxapi.py +12 -13
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/utils.py +7 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi.egg-info/PKG-INFO +46 -1
- {foxapi-1.3.2 → foxapi-1.4.0}/setup.py +1 -1
- {foxapi-1.3.2 → foxapi-1.4.0}/LICENSE +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/10.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/11.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/11COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/11WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/12.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/12COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/12WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/13.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/14.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/15.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/16.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/17.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/17COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/17WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/18.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/18COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/18WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/19.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/19COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/19WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/20.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/21.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/22.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/23.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/27.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/27COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/27WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/28.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/28COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/28WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/29.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/29COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/29WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/30.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/30COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/30WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/32.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/33.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/33COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/33WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/34.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/34COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/34WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/35.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/35COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/35WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/37.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/37COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/37WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/38.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/39.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/39COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/39WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/40.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/41.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/45.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/45COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/45WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/46.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/46COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/46WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/47.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/47COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/47WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/5.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/51.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/51COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/51WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/52.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/52COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/52WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/53.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/53COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/53WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/54.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/56.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/56COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/56WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/57.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/57COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/57WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/58.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/58COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/58WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/59COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/59WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/5COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/5WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/6.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/60COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/60WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/61.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/62.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/6COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/6WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/7.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/75.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/75COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/75WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/7COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/7WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/8.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/84COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/84WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/8COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/8WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/9.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/9COLONIALS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/9WARDENS.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/DebugIcon.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/MapIconCivicCenter.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/MapIconCoalFieldColor.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/MapIconFortCursed.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/MapIconHomeBaseHallColonial.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/MapIconHomeBaseHallWarden.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/MapIconOilFieldColor.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/MapIconSafehouse.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/MapIconScorchedTown.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/MapIconSulfurColor.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/MapIconTownHall.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/MapIconTownHallColonial.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/MapIconTownHallWarden.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/MapIconVictory.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/MapIconVictoryColonial.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapIcons/MapIconVictoryWarden.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapAcrithiaHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapAllodsBightHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapAshFieldsHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapBasinSionnachHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapCallahansPassageHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapCallumsCapeHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapClahstraHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapClansheadValleyHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapDeadLandsHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapDrownedValeHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapEndlessShoreHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapFarranacCoastHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapFishermansRowHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapGodcroftsHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapGreatMarchHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapHeartlandsHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapHomeRegionC.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapHomeRegionW.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapHowlCountyHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapKalokaiHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapKingsCageHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapLinnMercyHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapLochMorHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapMarbanHollow.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapMooringCountyHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapMorgensCrossingHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapNevishLineHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapOarbreakerHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapOriginHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapReachingTrailHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapReaversPassHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapRedRiverHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapSableportHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapShackledChasmHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapSpeakingWoodsHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapStemaLandingHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapStlicanShelfHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapStonecradleHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapTempestIslandHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapTerminusHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapTheFingersHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapUmbralWildwoodHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapViperPitHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapWeatheredExpanseHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/Images/MapsHex/MapWestgateHex.png +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi/__init__.py +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi.egg-info/SOURCES.txt +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi.egg-info/dependency_links.txt +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi.egg-info/requires.txt +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/foxapi.egg-info/top_level.txt +0 -0
- {foxapi-1.3.2 → foxapi-1.4.0}/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.0
|
|
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
|
|
@@ -49,6 +49,7 @@ Also, if you work with discord.py or any asynchronous API, this tool might be us
|
|
|
49
49
|
- [Map and War Data](#map-and-war-data)
|
|
50
50
|
- [Hexagon Operations](#hexagon-operations)
|
|
51
51
|
- [Listener Functions](#listener-functions)
|
|
52
|
+
- [Queue Tasks](#queue-tasks)
|
|
52
53
|
- [Error Handling](#error-handling)
|
|
53
54
|
- [Objects](#objects)
|
|
54
55
|
- [Example Usage](#example-usage)
|
|
@@ -160,6 +161,43 @@ on_hexagon_update(callback: callable = None, hexagons: list = "all")
|
|
|
160
161
|
```
|
|
161
162
|
- Registers a callback function to be called when the data for specified hexagons is updated.
|
|
162
163
|
|
|
164
|
+
|
|
165
|
+
### Queue Tasks
|
|
166
|
+
|
|
167
|
+
This library also give the possibility to queue up some sync and async methods to run them simultaneously
|
|
168
|
+
|
|
169
|
+
```py
|
|
170
|
+
from foxapi import FoxAPI
|
|
171
|
+
|
|
172
|
+
api = FoxAPI()
|
|
173
|
+
|
|
174
|
+
for i in range(10):
|
|
175
|
+
api.add_task(function=api.get_war) # or any other method
|
|
176
|
+
|
|
177
|
+
data = api.run_task_sync()
|
|
178
|
+
|
|
179
|
+
for elem in data:
|
|
180
|
+
print(elem.result)
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
```py
|
|
184
|
+
from foxapi import FoxAPI
|
|
185
|
+
import asyncio
|
|
186
|
+
|
|
187
|
+
api = FoxAPI()
|
|
188
|
+
|
|
189
|
+
async def main():
|
|
190
|
+
for i in range(10):
|
|
191
|
+
api.add_task(function=api.get_war) # or any other method
|
|
192
|
+
|
|
193
|
+
data = await api.run_task()
|
|
194
|
+
|
|
195
|
+
for elem in data:
|
|
196
|
+
print(elem.result)
|
|
197
|
+
|
|
198
|
+
asyncio.run(main())
|
|
199
|
+
```
|
|
200
|
+
|
|
163
201
|
## Error Handling
|
|
164
202
|
|
|
165
203
|
```pyEndpointError```: Raised if an invalid API endpoint is used.
|
|
@@ -170,6 +208,13 @@ on_hexagon_update(callback: callable = None, hexagons: list = "all")
|
|
|
170
208
|
## Objects
|
|
171
209
|
|
|
172
210
|
```python
|
|
211
|
+
class Task:
|
|
212
|
+
def __init__(self, function: callable, args: any = "no_args", result: any = None):
|
|
213
|
+
self.function: callable = function
|
|
214
|
+
self.args: any = args
|
|
215
|
+
self.result: any = result
|
|
216
|
+
|
|
217
|
+
|
|
173
218
|
class APIResponse:
|
|
174
219
|
def __init__(self, headers: dict, json: dict, status_code: int, hexagon: str, is_use_cache: bool):
|
|
175
220
|
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
|
|
@@ -76,11 +76,11 @@ class FoxAPI():
|
|
|
76
76
|
REQUESTS SYNC
|
|
77
77
|
"""
|
|
78
78
|
|
|
79
|
-
def get_data_sync(self, endpoint: str, etag: str = None, use_cache: bool = False):
|
|
79
|
+
def get_data_sync(self, endpoint: str, etag: str = None, use_cache: bool = False) -> APIResponse:
|
|
80
80
|
hexagon: str = self._retrieve_hexagon_from_endpoint(endpoint)
|
|
81
81
|
|
|
82
82
|
if use_cache == True:
|
|
83
|
-
cached_data = self.cache.get(endpoint)
|
|
83
|
+
cached_data: dict = self.cache.get(endpoint)
|
|
84
84
|
|
|
85
85
|
if cached_data is not None:
|
|
86
86
|
return APIResponse(headers={}, json=cached_data, status_code=None, hexagon=hexagon, is_cache=True)
|
|
@@ -114,7 +114,7 @@ class FoxAPI():
|
|
|
114
114
|
hexagon: str = self._retrieve_hexagon_from_endpoint(endpoint)
|
|
115
115
|
|
|
116
116
|
if use_cache == True:
|
|
117
|
-
cached_data = self.cache.get(endpoint)
|
|
117
|
+
cached_data: dict = self.cache.get(endpoint)
|
|
118
118
|
|
|
119
119
|
if cached_data is not None:
|
|
120
120
|
return APIResponse(headers={}, json=cached_data, status_code=None, hexagon=hexagon, is_cache=True)
|
|
@@ -128,9 +128,8 @@ class FoxAPI():
|
|
|
128
128
|
async with aiohttp.ClientSession() as session:
|
|
129
129
|
async with session.get(f"{self.base_api}{endpoint}", headers=headers) as data:
|
|
130
130
|
self.etag[endpoint]: str = data.headers.get("ETag", self.etag.get(endpoint))
|
|
131
|
-
|
|
131
|
+
data_json = await data.json()
|
|
132
132
|
if data.status == 200:
|
|
133
|
-
data_json = await data.json()
|
|
134
133
|
self.cache[endpoint] = data_json
|
|
135
134
|
return APIResponse(headers=data.headers, json=data_json, status_code=data.status, hexagon=hexagon, is_cache=False)
|
|
136
135
|
|
|
@@ -141,10 +140,10 @@ class FoxAPI():
|
|
|
141
140
|
else:
|
|
142
141
|
async with session.get(f"{self.base_api}{endpoint}", headers=headers) as data:
|
|
143
142
|
self.etag[endpoint]: str = data.headers.get("ETag", self.etag.get(endpoint))
|
|
143
|
+
data_json: dict = await data.json()
|
|
144
144
|
|
|
145
145
|
if data.status == 200:
|
|
146
|
-
|
|
147
|
-
self.cache[endpoint] = data_json
|
|
146
|
+
self.cache[endpoint]: dict = data_json
|
|
148
147
|
return APIResponse(headers=data.headers, json=data_json, status_code=data.status, hexagon=hexagon, is_cache=False)
|
|
149
148
|
|
|
150
149
|
elif data.status == 304:
|
|
@@ -426,7 +425,7 @@ class FoxAPI():
|
|
|
426
425
|
hexagon: str = self._format_hexagon(hexagon=hexagon)
|
|
427
426
|
|
|
428
427
|
if war_report is None:
|
|
429
|
-
war_report: dict = self.
|
|
428
|
+
war_report: dict = self.get_war_report_sync(hexagon)
|
|
430
429
|
|
|
431
430
|
if war_report is None:
|
|
432
431
|
raise FoxAPIError("Please pass the required parameters (hexagon or war_report)")
|
|
@@ -516,7 +515,7 @@ class FoxAPI():
|
|
|
516
515
|
"""
|
|
517
516
|
ASYNC TOOLS
|
|
518
517
|
"""
|
|
519
|
-
def add_task(self, function: callable, args:
|
|
518
|
+
def add_task(self, function: callable, args: any = "no_args"):
|
|
520
519
|
self.waiting_list.append([function, args])
|
|
521
520
|
|
|
522
521
|
async def run_task(self):
|
|
@@ -537,12 +536,12 @@ class FoxAPI():
|
|
|
537
536
|
tasks.append([asyncio.create_task(function(args)), function, args])
|
|
538
537
|
|
|
539
538
|
for task, function, args in tasks:
|
|
540
|
-
answers.append(
|
|
539
|
+
answers.append(Task(function=function, args=args, result=await task))
|
|
541
540
|
|
|
542
541
|
tasks.clear()
|
|
543
542
|
self.waiting_list.clear()
|
|
544
543
|
self.waiting_list: list = []
|
|
545
|
-
|
|
544
|
+
|
|
546
545
|
return answers
|
|
547
546
|
|
|
548
547
|
def run_task_sync(self, thread: bool = False):
|
|
@@ -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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: foxapi
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.0
|
|
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
|
|
@@ -49,6 +49,7 @@ Also, if you work with discord.py or any asynchronous API, this tool might be us
|
|
|
49
49
|
- [Map and War Data](#map-and-war-data)
|
|
50
50
|
- [Hexagon Operations](#hexagon-operations)
|
|
51
51
|
- [Listener Functions](#listener-functions)
|
|
52
|
+
- [Queue Tasks](#queue-tasks)
|
|
52
53
|
- [Error Handling](#error-handling)
|
|
53
54
|
- [Objects](#objects)
|
|
54
55
|
- [Example Usage](#example-usage)
|
|
@@ -160,6 +161,43 @@ on_hexagon_update(callback: callable = None, hexagons: list = "all")
|
|
|
160
161
|
```
|
|
161
162
|
- Registers a callback function to be called when the data for specified hexagons is updated.
|
|
162
163
|
|
|
164
|
+
|
|
165
|
+
### Queue Tasks
|
|
166
|
+
|
|
167
|
+
This library also give the possibility to queue up some sync and async methods to run them simultaneously
|
|
168
|
+
|
|
169
|
+
```py
|
|
170
|
+
from foxapi import FoxAPI
|
|
171
|
+
|
|
172
|
+
api = FoxAPI()
|
|
173
|
+
|
|
174
|
+
for i in range(10):
|
|
175
|
+
api.add_task(function=api.get_war) # or any other method
|
|
176
|
+
|
|
177
|
+
data = api.run_task_sync()
|
|
178
|
+
|
|
179
|
+
for elem in data:
|
|
180
|
+
print(elem.result)
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
```py
|
|
184
|
+
from foxapi import FoxAPI
|
|
185
|
+
import asyncio
|
|
186
|
+
|
|
187
|
+
api = FoxAPI()
|
|
188
|
+
|
|
189
|
+
async def main():
|
|
190
|
+
for i in range(10):
|
|
191
|
+
api.add_task(function=api.get_war) # or any other method
|
|
192
|
+
|
|
193
|
+
data = await api.run_task()
|
|
194
|
+
|
|
195
|
+
for elem in data:
|
|
196
|
+
print(elem.result)
|
|
197
|
+
|
|
198
|
+
asyncio.run(main())
|
|
199
|
+
```
|
|
200
|
+
|
|
163
201
|
## Error Handling
|
|
164
202
|
|
|
165
203
|
```pyEndpointError```: Raised if an invalid API endpoint is used.
|
|
@@ -170,6 +208,13 @@ on_hexagon_update(callback: callable = None, hexagons: list = "all")
|
|
|
170
208
|
## Objects
|
|
171
209
|
|
|
172
210
|
```python
|
|
211
|
+
class Task:
|
|
212
|
+
def __init__(self, function: callable, args: any = "no_args", result: any = None):
|
|
213
|
+
self.function: callable = function
|
|
214
|
+
self.args: any = args
|
|
215
|
+
self.result: any = result
|
|
216
|
+
|
|
217
|
+
|
|
173
218
|
class APIResponse:
|
|
174
219
|
def __init__(self, headers: dict, json: dict, status_code: int, hexagon: str, is_use_cache: bool):
|
|
175
220
|
self.headers: dict = headers
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|