quickstart.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:yahoo-fantasy-football-metrics 作者: uberfastman 项目源码 文件源码
def main():
    """Shows basic usage of the Google Drive API.

    Creates a Google Drive API service object and outputs the names and IDs
    for up to 10 files.
    """
    credentials = get_credentials()
    http = credentials.authorize(httplib2.Http())
    service = discovery.build('drive', 'v3', http=http)

    results = service.files().list(
        pageSize=10, fields="nextPageToken, files(id, name)").execute()
    items = results.get('files', [])
    if not items:
        print('No files found.')
    else:
        print('Files:')
        for item in items:
            print('{0} ({1})'.format(item['name'], item['id']))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号