foxapi 1.0.0__tar.gz → 1.0.4__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.
@@ -9,7 +9,7 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
9
  copies of the Software, and to permit persons to whom the Software is
10
10
  furnished to do so, subject to the following conditions:
11
11
 
12
-
12
+ You have to reference this library or my work if you use it, and no commercial use is permitted
13
13
 
14
14
  The above copyright notice and this permission notice shall be included in all
15
15
  copies or substantial portions of the Software.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: foxapi
3
- Version: 1.0.0
3
+ Version: 1.0.4
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
@@ -18,6 +18,14 @@ Requires-Dist: pillow
18
18
 
19
19
  # FoxAPI Documentation
20
20
 
21
+ #### If you use the PyPi version, you might need to download manually the `Images` folder in the [github](https://github.com/ThePhoenix78/FoxAPI/tree/main/foxapi) and pass it as an argument like `fox = FoxAPI(image_dir="Images")`
22
+
23
+ ## Installation
24
+ ```bash
25
+ pip install foxapi
26
+ ```
27
+
28
+
21
29
  `FoxAPI` is a wrapper for the Official Foxhole API. It provides methods to interact with various endpoints related to maps, war data, dynamic/static map states, and more. The client supports data caching and etags natively to avoid overloading the Foxhole servers.
22
30
 
23
31
  If you are new to the developer world (or lazy like me), it's the perfect tool!
@@ -1,5 +1,13 @@
1
1
  # FoxAPI Documentation
2
2
 
3
+ #### If you use the PyPi version, you might need to download manually the `Images` folder in the [github](https://github.com/ThePhoenix78/FoxAPI/tree/main/foxapi) and pass it as an argument like `fox = FoxAPI(image_dir="Images")`
4
+
5
+ ## Installation
6
+ ```bash
7
+ pip install foxapi
8
+ ```
9
+
10
+
3
11
  `FoxAPI` is a wrapper for the Official Foxhole API. It provides methods to interact with various endpoints related to maps, war data, dynamic/static map states, and more. The client supports data caching and etags natively to avoid overloading the Foxhole servers.
4
12
 
5
13
  If you are new to the developer world (or lazy like me), it's the perfect tool!
@@ -9,6 +9,7 @@ import threading
9
9
  import requests
10
10
  import aiohttp
11
11
  import asyncio
12
+ import pathlib
12
13
  import math
13
14
  import time
14
15
  import os
@@ -20,11 +21,14 @@ import os
20
21
 
21
22
 
22
23
  class FoxAPI():
23
- def __init__(self, safe_mode: bool = True):
24
+ def __init__(self, image_dir: str = None, safe_mode: bool = True):
24
25
  self.base_api: str = "https://war-service-live.foxholeservices.com/api/worldconquest"
25
26
  self.session: requests.Session = requests.Session()
26
27
 
27
- self._img_dir: str = os.path.join(Path(__file__).parent, "Images")
28
+ if image_dir is not None:
29
+ self._img_dir: str = pathlib.Path(image_dir)
30
+ else:
31
+ self._img_dir: str = os.path.join(Path(__file__).parent, "Images")
28
32
 
29
33
  self.cache: dict = {}
30
34
  self.etag: dict = {}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: foxapi
3
- Version: 1.0.0
3
+ Version: 1.0.4
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
@@ -18,6 +18,14 @@ Requires-Dist: pillow
18
18
 
19
19
  # FoxAPI Documentation
20
20
 
21
+ #### If you use the PyPi version, you might need to download manually the `Images` folder in the [github](https://github.com/ThePhoenix78/FoxAPI/tree/main/foxapi) and pass it as an argument like `fox = FoxAPI(image_dir="Images")`
22
+
23
+ ## Installation
24
+ ```bash
25
+ pip install foxapi
26
+ ```
27
+
28
+
21
29
  `FoxAPI` is a wrapper for the Official Foxhole API. It provides methods to interact with various endpoints related to maps, war data, dynamic/static map states, and more. The client supports data caching and etags natively to avoid overloading the Foxhole servers.
22
30
 
23
31
  If you are new to the developer world (or lazy like me), it's the perfect tool!
@@ -6,7 +6,7 @@ with open("README.md", "r") as stream:
6
6
 
7
7
  setup(
8
8
  name='foxapi',
9
- version="1.0.0",
9
+ version="1.0.4",
10
10
  url='https://github.com/ThePhoenix78/FoxAPI',
11
11
  download_url='https://github.com/ThePhoenix78/FoxAPI/tarball/master',
12
12
  license='MIT',
File without changes
File without changes
File without changes