No longer adding in the 'data' wrapper object if it is missing, as some APIs don't use it.
diff --git a/samples/buzz/buzz.py b/samples/buzz/buzz.py
index a49e3a6..94cba2a 100644
--- a/samples/buzz/buzz.py
+++ b/samples/buzz/buzz.py
@@ -36,15 +36,18 @@
print "Retrieved the first two activities"
# Retrieve the next two activities
- activitylist = activities.list_next(activitylist).execute()
- print "Retrieved the next two activities"
+ if activitylist:
+ activitylist = activities.list_next(activitylist).execute()
+ print "Retrieved the next two activities"
# Add a new activity
new_activity_body = {
- 'title': 'Testing insert',
- 'object': {
- 'content': u'Just a short note to show that insert is working. ☄',
- 'type': 'note'}
+ "data": {
+ 'title': 'Testing insert',
+ 'object': {
+ 'content': u'Just a short note to show that insert is working. ☄',
+ 'type': 'note'}
+ }
}
activity = activities.insert(userId='@me', body=new_activity_body).execute()
print "Added a new activity"
diff --git a/samples/moderator/moderator.py b/samples/moderator/moderator.py
index 3d742e8..da8d344 100644
--- a/samples/moderator/moderator.py
+++ b/samples/moderator/moderator.py
@@ -31,9 +31,11 @@
p = build("moderator", "v1", http=http)
series_body = {
+ "data": {
"description": "Share and rank tips for eating healthily on the cheaps!",
"name": "Eating Healthy & Cheap",
"videoSubmissionAllowed": False
+ }
}
series = p.series().insert(body=series_body).execute()
print "Created a new series"
diff --git a/samples/threadqueue/main.py b/samples/threadqueue/main.py
index 5e9314e..1b3b6af 100644
--- a/samples/threadqueue/main.py
+++ b/samples/threadqueue/main.py
@@ -81,9 +81,11 @@
p = build("moderator", "v1", http=http)
series_body = {
- "description": "An example of bulk creating topics",
- "name": "Using threading and queues",
- "videoSubmissionAllowed": False
+ "data": {
+ "description": "An example of bulk creating topics",
+ "name": "Using threading and queues",
+ "videoSubmissionAllowed": False
+ }
}
series = p.series().insert(body=series_body).execute()
print "Created a new series"