Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 432 Bytes

using-library.md

File metadata and controls

19 lines (13 loc) · 432 Bytes

Using library

Forward API tokens as constructor parameters:

import wloc

# Creating new object...
locator = wloc.WiFiLocator(gg_apikey='SAMPLE', ya_apikey='SAMPLE', mm_apikey='SAMPLE')

# Getting available networks...
locator.fetch_networks()

# Using providers...
result = locator.query_google()

# Printing result to stdout...
print('Latitude: %.6f\nLongitude: %.6f\n' % (result[0], result[1]))