Skip to content

Commit b32b9f6

Browse files
Additional simplifications to quickstart
1 parent 62cfdb9 commit b32b9f6

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

python/quickstart_web.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,21 +91,12 @@ def oauth2callback():
9191

9292
return flask.redirect(flask.url_for('index'))
9393

94-
def print_response(response):
95-
if response:
96-
return flask.jsonify(**response)
97-
else:
98-
return ('This request does not return a response. For these samples, ' +
99-
'this is generally true for requests that delete resources, ' +
100-
'such as <code>playlists.delete()</code>, but it is also ' +
101-
'true for some other methods, such as <code>videos.rate()</code>.')
102-
10394
def channels_list_by_username(client, **kwargs):
10495
response = client.channels().list(
10596
**kwargs
10697
).execute()
10798

108-
return print_response(response)
99+
return flask.jsonify(**response)
109100

110101

111102
if __name__ == '__main__':

0 commit comments

Comments
 (0)