google-photos-api

Is it possible to load google photos metadata into google sheets?

主宰稳场 提交于 2019-12-04 21:59:34
I have a project where I have scanned 10,000 family pictures from as far back as the 1900's and I am organizing them in Google Photos. I have a spreadsheet where I was keeping track of the proper dates and captions for the entire collection. I would organize a few at a time but then recently found out about the google photos API. I would like to use something like the methods Method: mediaItems.list or Method: mediaItems.search to get the data from my photos into the spreadsheet to manage. The output from these examples is exactly what I'm looking for and would want to load that into a

Can upload photo when using the Google Photos API

断了今生、忘了曾经 提交于 2019-12-04 14:59:18
I am trying to upload a photo (jpg image) using the new Google Photos API. I am able to get an uploadToken but when I try to create the media item I get the following error: { "newMediaItemResults": [ { "uploadToken": "CAIS+QIAkor2Yr4JcvYMMx..... ", "status": { "code": 3, "message": "NOT_IMAGE: There was an error while trying to create this media item." } } ] } Here is a snippet of my code: import sys import json import requests pic = 'image.jpg' fname = 'read_write_token_creds.json' with open(fname) as f: data = json.load(f) tok = data['access_token'] # Step 1 get an upload token URL = 'https

Access Google Photo API with Python using google-api-python-client

丶灬走出姿态 提交于 2019-12-04 12:25:11
问题 According to Google API Client Libraries page it is possible to access the Google Photos API using the python client library, but after installing it using pip install -t lib/ google-api-python-client I don't see anything related to Photos API. How can I use the Google built client library instead of manually calling the REST APIs? 回答1: Thanks to Ido Ran's and brillb's examples, I finally got my problem solved too. Some of the documentation links given above are not valid any more. Trying to

Google Photos API, pageSize Parameter not returning expected results

百般思念 提交于 2019-12-04 08:25:36
Using the Google Photos API Explorer I am trying to limit the number of albums returned using the albums.list method. If I set pageSize = 10, the api explorer returns 5 albums, if I set it to 3 in returns 1 album. Any suggestions as to why I am not seeing the same number of albums in the response as is set via the pageSize parameter? Thanks The page size describes the desired maximum number of results, but it is no guarantee. If you need at least 10 results from a single request, your best option would be to request a higher page size as you have found. Alternatively, you can always make