foxapi 1.0.4__tar.gz → 1.0.5__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.0.4 → foxapi-1.0.5}/PKG-INFO +13 -5
- {foxapi-1.0.4 → foxapi-1.0.5}/README.md +12 -4
- {foxapi-1.0.4 → foxapi-1.0.5}/foxapi.egg-info/PKG-INFO +13 -5
- {foxapi-1.0.4 → foxapi-1.0.5}/setup.py +1 -1
- {foxapi-1.0.4 → foxapi-1.0.5}/LICENSE +0 -0
- {foxapi-1.0.4 → foxapi-1.0.5}/foxapi/__init__.py +0 -0
- {foxapi-1.0.4 → foxapi-1.0.5}/foxapi/foxapi.py +0 -0
- {foxapi-1.0.4 → foxapi-1.0.5}/foxapi/utils.py +0 -0
- {foxapi-1.0.4 → foxapi-1.0.5}/foxapi.egg-info/SOURCES.txt +0 -0
- {foxapi-1.0.4 → foxapi-1.0.5}/foxapi.egg-info/dependency_links.txt +0 -0
- {foxapi-1.0.4 → foxapi-1.0.5}/foxapi.egg-info/requires.txt +0 -0
- {foxapi-1.0.4 → foxapi-1.0.5}/foxapi.egg-info/top_level.txt +0 -0
- {foxapi-1.0.4 → foxapi-1.0.5}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: foxapi
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.5
|
|
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
|
|
@@ -35,13 +35,14 @@ Also, if you work with discord.py or any asynchronous API, this tool might be us
|
|
|
35
35
|
|
|
36
36
|
## Table of Contents
|
|
37
37
|
- [Dependencies](#dependencies)
|
|
38
|
+
- [Wrapper](#wrapper)
|
|
38
39
|
- [Methods](#methods)
|
|
39
40
|
- [API Interaction](#api-interaction)
|
|
40
41
|
- [Map and War Data](#map-and-war-data)
|
|
41
42
|
- [Hexagon Operations](#hexagon-operations)
|
|
42
43
|
- [Listener Functions](#listener-functions)
|
|
43
44
|
- [Error Handling](#error-handling)
|
|
44
|
-
- [Objects](#
|
|
45
|
+
- [Objects](#objects)
|
|
45
46
|
- [Example Usage](#example-usage)
|
|
46
47
|
|
|
47
48
|
## Dependencies
|
|
@@ -50,6 +51,13 @@ Also, if you work with discord.py or any asynchronous API, this tool might be us
|
|
|
50
51
|
pip install pillow requests
|
|
51
52
|
```
|
|
52
53
|
|
|
54
|
+
## Wrapper
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
class FoxAPI(image_dir: str = None, safe_mode: bool = True)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
|
|
53
61
|
## Methods
|
|
54
62
|
|
|
55
63
|
### API Interaction (async)
|
|
@@ -100,7 +108,7 @@ Also, if you work with discord.py or any asynchronous API, this tool might be us
|
|
|
100
108
|
- **make_map_png(hexagon: str, dynamic: dict = None, static: dict = None) -> pillow.Image**
|
|
101
109
|
Generates a PNG image of the hexagon map with all the icons associated to each faction in their respective colors (included fields and town base). Only public data will be present.
|
|
102
110
|
|
|
103
|
-
- **calculate_death_rate(
|
|
111
|
+
- **calculate_death_rate(hexagon: str = None, war_report: dict = None): -> dict**
|
|
104
112
|
calculate the death rate between the first launch and the current one
|
|
105
113
|
|
|
106
114
|
### Listener Functions
|
|
@@ -150,11 +158,11 @@ from foxapi import FoxAPI
|
|
|
150
158
|
# Initialize the API client in safe mode
|
|
151
159
|
|
|
152
160
|
# if you are a developer and plane to use the exact hexagons name
|
|
153
|
-
# you can turn the
|
|
161
|
+
# you can turn the safe_mode off, otherwise it will convert
|
|
154
162
|
# api calls and hexagons name into valid ones
|
|
155
163
|
# Ex: deadlands -> DeadLandsHex (Yes, I am *that* lazy)
|
|
156
164
|
|
|
157
|
-
fox = FoxAPI(
|
|
165
|
+
fox = FoxAPI()
|
|
158
166
|
|
|
159
167
|
hexagon: str = "DeadLandsHex"
|
|
160
168
|
|
|
@@ -17,13 +17,14 @@ Also, if you work with discord.py or any asynchronous API, this tool might be us
|
|
|
17
17
|
|
|
18
18
|
## Table of Contents
|
|
19
19
|
- [Dependencies](#dependencies)
|
|
20
|
+
- [Wrapper](#wrapper)
|
|
20
21
|
- [Methods](#methods)
|
|
21
22
|
- [API Interaction](#api-interaction)
|
|
22
23
|
- [Map and War Data](#map-and-war-data)
|
|
23
24
|
- [Hexagon Operations](#hexagon-operations)
|
|
24
25
|
- [Listener Functions](#listener-functions)
|
|
25
26
|
- [Error Handling](#error-handling)
|
|
26
|
-
- [Objects](#
|
|
27
|
+
- [Objects](#objects)
|
|
27
28
|
- [Example Usage](#example-usage)
|
|
28
29
|
|
|
29
30
|
## Dependencies
|
|
@@ -32,6 +33,13 @@ Also, if you work with discord.py or any asynchronous API, this tool might be us
|
|
|
32
33
|
pip install pillow requests
|
|
33
34
|
```
|
|
34
35
|
|
|
36
|
+
## Wrapper
|
|
37
|
+
|
|
38
|
+
```python
|
|
39
|
+
class FoxAPI(image_dir: str = None, safe_mode: bool = True)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
|
|
35
43
|
## Methods
|
|
36
44
|
|
|
37
45
|
### API Interaction (async)
|
|
@@ -82,7 +90,7 @@ Also, if you work with discord.py or any asynchronous API, this tool might be us
|
|
|
82
90
|
- **make_map_png(hexagon: str, dynamic: dict = None, static: dict = None) -> pillow.Image**
|
|
83
91
|
Generates a PNG image of the hexagon map with all the icons associated to each faction in their respective colors (included fields and town base). Only public data will be present.
|
|
84
92
|
|
|
85
|
-
- **calculate_death_rate(
|
|
93
|
+
- **calculate_death_rate(hexagon: str = None, war_report: dict = None): -> dict**
|
|
86
94
|
calculate the death rate between the first launch and the current one
|
|
87
95
|
|
|
88
96
|
### Listener Functions
|
|
@@ -132,11 +140,11 @@ from foxapi import FoxAPI
|
|
|
132
140
|
# Initialize the API client in safe mode
|
|
133
141
|
|
|
134
142
|
# if you are a developer and plane to use the exact hexagons name
|
|
135
|
-
# you can turn the
|
|
143
|
+
# you can turn the safe_mode off, otherwise it will convert
|
|
136
144
|
# api calls and hexagons name into valid ones
|
|
137
145
|
# Ex: deadlands -> DeadLandsHex (Yes, I am *that* lazy)
|
|
138
146
|
|
|
139
|
-
fox = FoxAPI(
|
|
147
|
+
fox = FoxAPI()
|
|
140
148
|
|
|
141
149
|
hexagon: str = "DeadLandsHex"
|
|
142
150
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: foxapi
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.5
|
|
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
|
|
@@ -35,13 +35,14 @@ Also, if you work with discord.py or any asynchronous API, this tool might be us
|
|
|
35
35
|
|
|
36
36
|
## Table of Contents
|
|
37
37
|
- [Dependencies](#dependencies)
|
|
38
|
+
- [Wrapper](#wrapper)
|
|
38
39
|
- [Methods](#methods)
|
|
39
40
|
- [API Interaction](#api-interaction)
|
|
40
41
|
- [Map and War Data](#map-and-war-data)
|
|
41
42
|
- [Hexagon Operations](#hexagon-operations)
|
|
42
43
|
- [Listener Functions](#listener-functions)
|
|
43
44
|
- [Error Handling](#error-handling)
|
|
44
|
-
- [Objects](#
|
|
45
|
+
- [Objects](#objects)
|
|
45
46
|
- [Example Usage](#example-usage)
|
|
46
47
|
|
|
47
48
|
## Dependencies
|
|
@@ -50,6 +51,13 @@ Also, if you work with discord.py or any asynchronous API, this tool might be us
|
|
|
50
51
|
pip install pillow requests
|
|
51
52
|
```
|
|
52
53
|
|
|
54
|
+
## Wrapper
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
class FoxAPI(image_dir: str = None, safe_mode: bool = True)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
|
|
53
61
|
## Methods
|
|
54
62
|
|
|
55
63
|
### API Interaction (async)
|
|
@@ -100,7 +108,7 @@ Also, if you work with discord.py or any asynchronous API, this tool might be us
|
|
|
100
108
|
- **make_map_png(hexagon: str, dynamic: dict = None, static: dict = None) -> pillow.Image**
|
|
101
109
|
Generates a PNG image of the hexagon map with all the icons associated to each faction in their respective colors (included fields and town base). Only public data will be present.
|
|
102
110
|
|
|
103
|
-
- **calculate_death_rate(
|
|
111
|
+
- **calculate_death_rate(hexagon: str = None, war_report: dict = None): -> dict**
|
|
104
112
|
calculate the death rate between the first launch and the current one
|
|
105
113
|
|
|
106
114
|
### Listener Functions
|
|
@@ -150,11 +158,11 @@ from foxapi import FoxAPI
|
|
|
150
158
|
# Initialize the API client in safe mode
|
|
151
159
|
|
|
152
160
|
# if you are a developer and plane to use the exact hexagons name
|
|
153
|
-
# you can turn the
|
|
161
|
+
# you can turn the safe_mode off, otherwise it will convert
|
|
154
162
|
# api calls and hexagons name into valid ones
|
|
155
163
|
# Ex: deadlands -> DeadLandsHex (Yes, I am *that* lazy)
|
|
156
164
|
|
|
157
|
-
fox = FoxAPI(
|
|
165
|
+
fox = FoxAPI()
|
|
158
166
|
|
|
159
167
|
hexagon: str = "DeadLandsHex"
|
|
160
168
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|