google-photos

Google Apps Scripts: import (upload) media from Google Drive to Google Photos?

核能气质少年 提交于 2020-05-15 21:45:47
问题 I see that we can import (upload) media (photos, videos,...) from Google Drive to Google Photos. My goal is: do this task with code. I have successfully got a list of photos from Google Drive, and I store their IDs in an Array. I have this code: var arrId = [ //Some image id... ]; var length = arrId.length; var driveApplication = DriveApp; for(var i=0;i<length;++i) { var file = driveApplication.getFileById(arrId[i]); //Now I got the file, how can I programmatically import this file to Google

Google Apps Scripts: import (upload) media from Google Drive to Google Photos?

早过忘川 提交于 2020-05-15 21:45:46
问题 I see that we can import (upload) media (photos, videos,...) from Google Drive to Google Photos. My goal is: do this task with code. I have successfully got a list of photos from Google Drive, and I store their IDs in an Array. I have this code: var arrId = [ //Some image id... ]; var length = arrId.length; var driveApplication = DriveApp; for(var i=0;i<length;++i) { var file = driveApplication.getFileById(arrId[i]); //Now I got the file, how can I programmatically import this file to Google

Selecting video from Google Photos provider doesn't give mimetype information

百般思念 提交于 2020-02-23 10:09:14
问题 I've created a sample here to reproduce this issue. I'm running this project on an emulator with API level 29 and selecting a video from google photos provider. But I cannot figure out how to get the mimeType of the selected file. I've used ContentResolver's getType method which returns null and also ContentResolver query method which somehow throws an IllegalArgumentException to me. I've attached a screenshot for the same. Note: Everything works fine if I select the same file by navigating

Access google photos API via Java

匆匆过客 提交于 2020-01-01 19:33:11
问题 I am very new to google API and I am having troubles with it. I red documentation Google photos API for Java, then I created OAuth credentials in google API console and downloaded it (credentials.json file). After that I tried to access google photos. Here is code from documentation: // Set up the Photos Library Client that interacts with the API PhotosLibrarySettings settings = PhotosLibrarySettings.newBuilder() .setCredentialsProvider( FixedCredentialsProvider.create(/* Add credentials here

Access google photos API via Java

余生长醉 提交于 2020-01-01 19:33:04
问题 I am very new to google API and I am having troubles with it. I red documentation Google photos API for Java, then I created OAuth credentials in google API console and downloaded it (credentials.json file). After that I tried to access google photos. Here is code from documentation: // Set up the Photos Library Client that interacts with the API PhotosLibrarySettings settings = PhotosLibrarySettings.newBuilder() .setCredentialsProvider( FixedCredentialsProvider.create(/* Add credentials here

Fetching Photos from google photos Objective c [iOS]

自闭症网瘾萝莉.ら 提交于 2019-12-31 05:07:38
问题 Tried many ways to fetch photos from Google photos with picasa webalbum and Google drive but i cant achieve the result.Please let me know how to fetch google photos alone and below coding displays only drive like Pdf docs etc but i need photos...Is there is any query i need to implement instead of files or id.The sample coding is based on Mac and there is no proper solution for iOS and everything in XML format please guide me to overcome this. GTLRDriveQuery_FilesList *query = [GTLRDriveQuery

Is there an upload API for Google Photos (photos.google.com)?

做~自己de王妃 提交于 2019-12-29 02:17:26
问题 Does the Google Photos app, released on May 28, 2015, have an API which allows uploading of photos? The app seems to build on Picassa and Google+. Can one of their APIs can be used to upload into Google Photos? 回答1: There's an official API for Google Photos now. It contains an upload media endpoint. That section mentions that all photos uploaded through that endpoint are counted towards the user's storage limit: Note: All media items uploaded to Google Photos through the API are stored in

Retrieve file size for videos stored on Google Photos

感情迁移 提交于 2019-12-24 03:24:05
问题 Context: I wanted to see how I'm using my Google Photos space and I wrote a little script in Python that uses the Google Photos API to retrieve all my albums and it's contents (using https://developers.google.com/photos/library/reference/rest/v1/mediaItems/search). The file information is not there but using the mediaItem baseUrl (documented https://developers.google.com/photos/library/reference/rest/v1/mediaItems#MediaItem) I can then perform a HEAD request and get the content-length from

What format does the Google Places Photos API return the image in?

北城以北 提交于 2019-12-22 10:48:12
问题 Have a look at this API: https://maps.googleapis.com/maps/api/place/photo?maxwidth=400&photoreference=CnRtAAAATLZNl354RwP_9UKbQ_5Psy40texXePv4oAlgP4qNEkdIrkyse7rPXYGd9D_Uj1rVsQdWT4oRz4QrYAJNpFX7rzqqMlZw2h2E2y5IKMUZ7ouD_SlcHxYq1yL4KbKUv3qtWgTK0A6QbGh87GB3sscrHRIQiG2RrmU_jF4tENr9wGS_YxoUSSDrYjWmrNfeEHSGSc3FyhNLlBU&key=AddYourOwnKeyHere When you invoke it using Postman, or in a browser, it returns an image which is rendered beautifully. Now, from inside an app, when I use $http or jQuery to call

Uploading photo to Google Photos API not returning upload token

[亡魂溺海] 提交于 2019-12-22 05:11:53
问题 I'm using the 2018 version of the Google Photos API to upload images and media as documented here: "Uploading Bytes" When I upload a new image or video I never get an upload token in the body of the response. It's always an empty body, which according to the above link means that the bytes have already been uploaded (but this is a new upload). Here's an example request/response: request: POST https://photoslibrary.googleapis.com/v1/uploads request headers: authorization: Bearer abcd1234 X