Ejemplo n.º 1
0
def locationGPS():
    from temboo.Library.Google.Geocoding import GeocodeByAddress
    from temboo.core.session import TembooSession
    locale = callback()
    session = TembooSession('jack727', 'myFirstApp', 'ZjdczC9s7nPiHX80gyXx7YxkoYVDQRBK')
    geocodeByAddressChoreo = GeocodeByAddress(session)
    geocodeByAddressInputs = geocodeByAddressChoreo.new_input_set()
    geocodeByAddressInputs.set_Address(str(locale))
    geocodeByAddressResults = geocodeByAddressChoreo.execute_with_results(geocodeByAddressInputs)
    Talk('Okay ' + GlobalFile.user + ' here is your location')
    Talk("Longitude: " + geocodeByAddressResults.get_Longitude,1())
    Talk("Latitude: " + geocodeByAddressResults.get_Latitude, 1())
Ejemplo n.º 2
0
from temboo.Library.Google.Geocoding import GeocodeByAddress
from temboo.core.session import TembooSession

# Create a session with your Temboo account details
session = TembooSession("ngandrea", "myFirstApp", "1d24c665d3394db49ed936e8853585d0")

# Instantiate the Choreo
geocodeByAddressChoreo = GeocodeByAddress(session)

# Get an InputSet object for the Choreo
geocodeByAddressInputs = geocodeByAddressChoreo.new_input_set()

# Set the Choreo inputs
geocodeByAddressInputs.set_Address("21 Tampines Ave 1, 529757")
geocodeByAddressInputs.set_ResponseFormat("json")

# Execute the Choreo
geocodeByAddressResults = geocodeByAddressChoreo.execute_with_results(geocodeByAddressInputs)

# Print the Choreo outputs
print("Latitude: " + geocodeByAddressResults.get_Latitude())
print("Response: " + geocodeByAddressResults.get_Response())
print("Longitude: " + geocodeByAddressResults.get_Longitude())
Ejemplo n.º 3
0
from temboo.Library.Google.Geocoding import GeocodeByAddress
from temboo.core.session import TembooSession

# Create a session with your Temboo account details
session = TembooSession("accountName", "myFirstApp", "abc123xxxxxxxxxxxxxx")

# Instantiate the Choreo
geocodeByAddressChoreo = GeocodeByAddress(session)

# Get an InputSet object for the Choreo
geocodeByAddressInputs = geocodeByAddressChoreo.new_input_set()

# Set credential to use for execution
geocodeByAddressInputs.set_credential('Omar')

# Execute the Choreo
geocodeByAddressResults = geocodeByAddressChoreo.execute_with_results(
    geocodeByAddressInputs)

# Print the Choreo outputs
print("Latitude: " + geocodeByAddressResults.get_Latitude())
print("Longitude: " + geocodeByAddressResults.get_Longitude())
print("Response: " + geocodeByAddressResults.get_Response())