0

I am using the Google API client in Python3.

All the examples always go about using discovery.build to create a service and then perform actions using that.

So... I don't think uploads as described here are possible simply using the API. Is that right?

https://developers.google.com/apis-explorer/#p/discovery/v1/discovery.apis.getRest?api=photoslibrary&version=v1&_h=2&

Is the way folks solve this by making a request and not relying upon the google API client?

Aamir
  • 1
  • Why do you think `uploads()` should be an endpoint in the Python client? `uploads()` isn't a thing in the REST API: https://developers.google.com/photos/library/reference/rest/ . Did you mean `batchCreate` and `create`? Those are the endpoints that let you create things. – tehhowch Oct 08 '18 at 19:18
  • From a quick check of the Photos API docs, it doesn't seem like the relevant support for the Python client library has been added yet - just the Java and PHP clients: https://developers.google.com/photos/library/guides/client-libraries - which means you'll need to make authorized HTTP calls and do the grunt work yourself https://developers.google.com/photos/library/guides/upload-media#uploading-bytes – tehhowch Oct 08 '18 at 19:21
  • See https://stackoverflow.com/a/52038045/9337071 for some Python code that should get you started, or at least help you [edit](https://stackoverflow.com/posts/52674334/edit) this question to be answerable – tehhowch Oct 08 '18 at 20:10
  • Yes I agree that there is a workaround. The Google Photos API website says to file issues here, I think... so I'm hoping this is enough info for them. You're right it looks like it's in the other clients. – Aamir Oct 09 '18 at 20:16
  • No, file an issue on the actual client library repo (on GitHub). This isn't a feature tracker for Google *anything*. – tehhowch Oct 09 '18 at 21:04

0 Answers0