Added mocks for the generated service objects. Also fixed a bunch of formatting.
diff --git a/samples/latitude/latitude.py b/samples/latitude/latitude.py
index 492300c..029b74a 100644
--- a/samples/latitude/latitude.py
+++ b/samples/latitude/latitude.py
@@ -20,6 +20,7 @@
# Uncomment to get detailed logging
# httplib2.debuglevel = 4
+
def main():
f = open("latitude.dat", "r")
credentials = pickle.loads(f.read())
@@ -32,11 +33,11 @@
body = {
"data": {
- "kind":"latitude#location",
- "latitude":37.420352,
- "longitude":-122.083389,
- "accuracy":130,
- "altitude":35
+ "kind": "latitude#location",
+ "latitude": 37.420352,
+ "longitude": -122.083389,
+ "accuracy": 130,
+ "altitude": 35
}
}
print p.currentLocation().insert(body=body).execute()
diff --git a/samples/latitude/three_legged_dance.py b/samples/latitude/three_legged_dance.py
index d8d89ba..56f4f59 100644
--- a/samples/latitude/three_legged_dance.py
+++ b/samples/latitude/three_legged_dance.py
@@ -36,10 +36,10 @@
# https://www.google.com/accounts/ManageDomains
consumer_key='REGISTERED DOMAIN NAME',
consumer_secret='KEY GIVEN DURING REGISTRATION',
- user_agent='google-api-client-python-latitude-cmdline/1.0',
+ user_agent='google-api-client-python-latitude/1.0',
domain='REGISTERED DOMAIN NAME',
scope='https://www.googleapis.com/auth/latitude',
- xoauth_displayname='Google API Latitude Client Example App',
+ xoauth_displayname='Google API Latitude Example',
location='current',
granularity='city'
)