コード例 #1
0
from __future__ import print_function
import time
import unwired
from unwired.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = unwired.GEOLOCATIONApi()

#cell schema 
c=unwired.CellSchema(lac=38996,cid=12814)
celldata=[c]

#fallback schema
f=unwired.FallbackSchema(scf=2)

# GeolocationSchema | 
geolocation_schema = unwired.GeolocationSchema(token="YOUR_API_KEY",
    radio="utms",mcc=310,mnc=404,cells=celldata,fallbacks=f,
    address=1) 


try:
    # Geolocation
    api_response = api_instance.geolocation(geolocation_schema)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GEOLOCATIONApi->geolocation: %s\n" % e)
コード例 #2
0
from __future__ import print_function
import time
import unwired
from unwired.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = unwired.GEOLOCATIONApi()

#Fallback Schema
f = unwired.FallbackSchema(ipf=1)

# GeolocationSchema |
geolocation_schema = unwired.GeolocationSchema(token="YOUR_API_KEY",
                                               ip="49.204.218.106",
                                               fallbacks=f,
                                               address=1)

try:
    # Geolocation
    api_response = api_instance.geolocation(geolocation_schema)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GEOLOCATIONApi->geolocation: %s\n" % e)
コード例 #3
0
from __future__ import print_function
import time
import unwired
from unwired.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = unwired.GEOLOCATIONApi()

#cell schema
c = unwired.CellSchema(radio="gsm", mcc=310, mnc=404, lac=7011, cid=0)
celldata = [c]

#Fallback Schema
f = unwired.FallbackSchema(lacf=2)

# Geolocation Schema
geolocation_schema = unwired.GeolocationSchema(token="YOUR_API_KEY",
                                               cells=celldata,
                                               fallbacks=f,
                                               address=1)

try:
    # Geolocation
    api_response = api_instance.geolocation(geolocation_schema)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GEOLOCATIONApi->geolocation: %s\n" % e)
コード例 #4
0
from __future__ import print_function
import time
import unwired
from unwired.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = unwired.GEOLOCATIONApi()

#wifi Schema
w1 = unwired.WifiSchema(bssid="00:17:c5:cd:ca:aa",
                        channel=11,
                        frequency=2412,
                        signal=-51)
w2 = unwired.WifiSchema(bssid="d8:97:ba:c2:f0:5a")
wifidata = [w1, w2]

# GeolocationSchema
geolocation_schema = unwired.GeolocationSchema(token="YOUR_API_KEY",
                                               wifi=wifidata,
                                               address=1)

try:
    # Geolocation
    api_response = api_instance.geolocation(geolocation_schema)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GEOLOCATIONApi->geolocation: %s\n" % e)
コード例 #5
0
from __future__ import print_function
import time
import unwired
from unwired.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = unwired.GEOLOCATIONApi()

#cell schema
c1 = unwired.CellSchema(lac=7033, cid=17811)
celldata = [c1]

# GeolocationSchema |
geolocation_schema = unwired.GeolocationSchema(token="YOUR_API_KEY",
                                               radio="gsm",
                                               mcc=310,
                                               mnc=404,
                                               cells=celldata,
                                               address=2)

try:
    # Geolocation
    api_response = api_instance.geolocation(geolocation_schema)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GEOLOCATIONApi->geolocation: %s\n" % e)
コード例 #6
0
from __future__ import print_function
import time
import unwired
from unwired.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = unwired.GEOLOCATIONApi()

#cell Schema
c1 = unwired.CellSchema(lac=7, cid=4864)
celldata = [c1]

#Geolocation Schema
geolocation_schema = unwired.GeolocationSchema(token="YOUR_API_KEY",
                                               radio="cdma",
                                               mnc=404,
                                               cells=celldata,
                                               address=1)

try:
    # Geolocation
    api_response = api_instance.geolocation(geolocation_schema)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GEOLOCATIONApi->geolocation: %s\n" % e)