<s> """<STR_LIT>""" <EOL> from __future__ import print_function <EOL> __author__ = '<STR_LIT>' <EOL> import sys <EOL> from oauth2client import client <EOL> from googleapiclient import sample_tools <EOL> def main ( argv ) : <EOL> service , flags = sample_tools . init ( <EOL> argv , '<STR_LIT>' , '<STR_LIT>' , __doc__ , __file__ , <EOL> scope = '<STR_LIT>' ) <EOL> try : <EOL> users = service . users ( ) <EOL> thisuser = users . get ( userId = '<STR_LIT>' ) . execute ( ) <EOL> print ( '<STR_LIT>' % thisuser [ '<STR_LIT>' ] ) <EOL> blogs = service . blogs ( ) <EOL> thisusersblogs = blogs . listByUser ( userId = '<STR_LIT>' ) . execute ( ) <EOL> for blog in thisusersblogs [ '<STR_LIT>' ] : <EOL> print ( '<STR_LIT>' % ( blog [ '<STR_LIT:name>' ] , blog [ '<STR_LIT:url>' ] ) ) <EOL> posts = service . posts ( ) <EOL> for blog in thisusersblogs [ '<STR_LIT>' ] : <EOL> print ( '<STR_LIT>' % blog [ '<STR_LIT:name>' ] ) <EOL> request = posts . list ( blogId = blog [ '<STR_LIT:id>' ] ) <EOL> while request != None : <EOL> posts_doc = request . execute ( ) <EOL> if '<STR_LIT>' in posts_doc and not ( posts_doc [ '<STR_LIT>' ] is None ) : <EOL> for post in posts_doc [ '<STR_LIT>' ] : <EOL> print ( '<STR_LIT>' % ( post [ '<STR_LIT:title>' ] , post [ '<STR_LIT:url>' ] ) ) <EOL> request = posts . list_next ( request , posts_doc ) <EOL> except client . AccessTokenRefreshError : <EOL> print ( '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( sys . argv ) </s>
