FlightRadarAPI 1.3.19__tar.gz → 1.3.21__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.
@@ -13,7 +13,7 @@ https://www.flightradar24.com/terms-and-conditions
13
13
  """
14
14
 
15
15
  __author__ = "Jean Loui Bernard Silva de Jesus"
16
- __version__ = "1.3.19"
16
+ __version__ = "1.3.21"
17
17
 
18
18
  from .api import FlightRadar24API, FlightTrackerConfig
19
19
  from .entities import Airport, Entity, Flight
@@ -165,6 +165,21 @@ class FlightRadar24API(object):
165
165
 
166
166
  return airports
167
167
 
168
+ def get_bookmarks(self) -> Dict:
169
+ """
170
+ Get the bookmarks from the FlightRadar24 account.
171
+ """
172
+ if not self.is_logged_in():
173
+ raise LoginError("You must log in to your account.")
174
+
175
+ headers = Core.json_headers.copy()
176
+ headers["accesstoken"] = self.get_login_data()["accessToken"]
177
+
178
+ cookies = self.__login_data["cookies"]
179
+
180
+ response = APIRequest(Core.bookmarks_data_url, headers = headers, cookies = cookies)
181
+ return response.get_content()
182
+
168
183
  def get_bounds(self, zone: Dict[str, float]) -> str:
169
184
  """
170
185
  Convert coordinate dictionary to a string "y1, y2, x1, x2".
@@ -327,6 +342,13 @@ class FlightRadar24API(object):
327
342
  response = APIRequest(Core.most_tracked_url, headers = Core.json_headers)
328
343
  return response.get_content()
329
344
 
345
+ def get_volcanic_eruptions(self) -> Dict:
346
+ """
347
+ Return boundaries of volcanic eruptions and ash clouds impacting aviation.
348
+ """
349
+ response = APIRequest(Core.volcanic_eruption_data_url, headers = Core.json_headers)
350
+ return response.get_content()
351
+
330
352
  def get_zones(self) -> Dict[str, Dict]:
331
353
  """
332
354
  Return all major zones on the globe.
@@ -37,6 +37,12 @@ class Core(ABC):
37
37
  # Zones data URL.
38
38
  zones_data_url = flightradar_base_url + "/js/zones.js.php"
39
39
 
40
+ # Weather data URL.
41
+ volcanic_eruption_data_url = flightradar_base_url + "/weather/volcanic"
42
+
43
+ # Bookmarks data URL.
44
+ bookmarks_data_url = flightradar_base_url + "/webapi/v1/bookmarks"
45
+
40
46
  # Country flag image URL.
41
47
  country_flag_url = flightradar_base_url + "/static/images/data/flags-small/{}.svg"
42
48
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: FlightRadarAPI
3
- Version: 1.3.19
3
+ Version: 1.3.21
4
4
  Summary: SDK for FlightRadar24
5
5
  Project-URL: Homepage, https://github.com/JeanExtreme002/FlightRadarAPI
6
6
  Author-email: Jean Loui Bernard Silva de Jesus <jeanextreme002@gmail.com>
File without changes