Skip to content

Commit

Permalink
Additional simplifications to quickstart
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyDiamondstein committed Sep 29, 2017
1 parent 62cfdb9 commit b32b9f6
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions python/quickstart_web.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,12 @@ def oauth2callback():

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

def print_response(response):
if response:
return flask.jsonify(**response)
else:
return ('This request does not return a response. For these samples, ' +
'this is generally true for requests that delete resources, ' +
'such as <code>playlists.delete()</code>, but it is also ' +
'true for some other methods, such as <code>videos.rate()</code>.')

def channels_list_by_username(client, **kwargs):
response = client.channels().list(
**kwargs
).execute()

return print_response(response)
return flask.jsonify(**response)


if __name__ == '__main__':
Expand Down

0 comments on commit b32b9f6

Please sign in to comment.