Access private document from google drive using google drive api - spring-boot

I am new to Google Drive API. I read on the google quickstart guide that we can access list of documents from our drive but can we do the same with the documents shared privately to us. Like if someone gave me view access of the document from their drive, Can I download it with Google drive API? I am trying to do this in a spring-boot application.

Yes, you can use Files.list() to list the files shared with you. To do so you should use the q parameter to filter those files. For example, you may use 'SaumyaShah#gmail.com' in readers if you want to list the files that have been shared with you. Here you can learn more about the q parameter. For further information about how to download those files, please follow this guide. Feel free to leave a comment if you still have doubts about these approaches.

Related

How do you add a new API entry to the directory?

This is a surprisingly simple question, but I am unable to find the answer despite a solid search.
How are APIs added to the Google APIs Explorer Directory?
Google has an api called the google discovery services api this api contains a list of most of their apis
So by adding a record for a new api in descovery services it shows up in explorer
Only Developers at Google can add an entry to the Google API Directory

Save uploaded files to Google Drive from website built on Ruby Volt

I'm building a web site using Ruby Volt for a publication. I'd like users to be able to upload images that will be stored on Google Drive. The Google Drive will belong to the publication, not to the site users who are uploading the images. If possible, I'd like the fact the images are being stored on Google Drive to be transparent to the site users.
The publication staff will access the images via their Google Drive.
My head is swimming with the Google documentation… Does anybody know if this is doable? If it is can you offer any pointers to example code or suggestions on how to get started?
So I can't help with the google drive API side of things, but in Volt, you can use a HttpController to post a input type="field". In the http controller, you can call params._field_name to get the data from rest. That will provide a tempfile you can copy out. Once I get time I'll make a demo app for file upload.

Google Drive API for attaching files

We have old gdata libraries for Document List API and there is a method for Attchments. We are changing it to Drive API but we are ot finding anything related to attachments in Drive API. Do we have to use Files.insert instead? Please advise.

Transferring ownership of a specific Google Doc file using google-api-ruby-client

I'm looking to transfer ownership of a specific Google Docs file using the Google Apps API. There are many accounts on a single Google Apps domain. There are many files I would like to transfer so I do not want to do it manually.
In the UI I've only seen the ability to transfer ownership of all files from a particular user rather than individual files.
I've looked through the GitHub page for the google-api-ruby-client gem, but I was unable to come up with a solution. Can someone point me in the right direction or post an example?
You'll need to use the Google Drive API. Specifically the Permissions "update" method.
First find/get the File ID, using the Files.List method, which will allow you to search using a query. Then use the Permissions.Update (or Patch) method, making sure to set the transferOwnership parameter to True.
Full documentation is here: Google Drive API - Permissions

Unable to google Google-API directory

I know its silly, but previously this URL used to show me all available google open source API's Pervious working API link but now its showing some other page. I am tired of searching the complete API directory. I want to pick one to learn. I have managed to find a similar page which shows only partial API's directory. Google API directory Can any one provide me the correct URL to see complete directory?
I must admit, it's a mess if you take a fresh start.
Accessing Google Apis can be basically be done in two ways.
The old way : Google Data Java Client Library (a.k.a. "gdata-java-client") : docs here. Implemented services can be found at Google Api Docs (the link you are referring to).
The new way : Google API Client Library for Java (a.k.a. "google-api-java-client") : docs here. The Api explorer shows the generated client libraries using the new infrastructure. Or this list.
Both libraries are available for different languages and for different Google services. GData is the most mature library and supports most services.
The new way however is more flexible : the client libraries and even the docs can be automatically generated for any Google service that is ready to transition to the new infrastructure. On the downside, not all Google services have a client library ready for the new infrastructure (e.g. Contacts).
You can access services that are not yet transitioned but you have to write your own XML model.
There is a migration guide to move from GData to new infrastructure.
try to find it on this page:
http://www.programmableweb.com/apis/directory/1?company=Google
or you can explore some apis here: (i don't know if thats all)
http://code.google.com/apis/explorer/
or just search what you need on:
http://developers.google.com

Resources