![]() |
wloc
0.7.0
Simple Wi-Fi geolocation library and tool
|
Public Member Functions | |
def | __init__ (self, str apikey) |
list | get_coords (self, list netlist) |
Private Member Functions | |
list | _execute (self, list netlist) |
str | _uri (self) |
Static Private Member Functions | |
None | _check_response (r) |
Class for working with Mozilla Geolocation API.
def wloc.backends.mozilla.BackendMozilla.__init__ | ( | self, | |
str | apikey | ||
) |
Main constructor of the BackendMozilla class. :param apikey: String with the API token (key).
Reimplemented from wloc.backends.google.BackendGoogle.
|
staticprivateinherited |
Checks the API response for errors. :param r: An instance of the Response class. :exception BackendError: An HTTP error has occurred.
|
privateinherited |
Internal implementation of the Google Geolocation API fetcher. :param netlist: The list of available Wi-Fi networks. :return: Coordinates (float).
Reimplemented from wloc.backends.BackendCommon.
|
privateinherited |
Gets fully-qualified geolocation API URI. :return: Fully-qualified geolocation API URI.
Reimplemented from wloc.backends.BackendCommon.
|
inherited |
Calls the backend API and returns the coordinates. :param netlist: The list of available Wi-Fi networks. :exception MissingTokenError: API token not entered or is not valid. :exception NetworksNotFoundError: The wireless networks list is empty. :return: Coordinates (float).