I went through method documentations both patch and update and it looks they both doing the same.
And i also note that the patch doesn't required the content of the patching comment even though its required to call the patch() method.
So, is the difference between comment.patch() and the comment.update() methods in Google Drive API?
PS : I'm using Google-Drive Java SDK for my implementation.
Thanks.
Patch is used to perform partial updates and save some bandwidth when, for instance, you only want to update a single field in a resource.
For more details about how patch work and for other performance tips, please check the Google Drive SDK documentation:
https://developers.google.com/drive/performance#patch
Related
I have been running GDrive API v3 using our Node.js API for awhile now (1+ year), and everything has been functional for creating (drive.files.create) & reading (drive.files.get) DOCX files through the Google Drive API logic using a service account. Everything has been working perfectly fine.
Today I am trying to extend our infrastructure to handle some generic Google Docs files (rather than the existing DOCX stored within GDrive) using the same service account, but the GDrive API is now returning a 403 "Forbidden" error for these files specifically. I can't seem to figure out why there would be a difference in permissions for two file formats that are within the same service account (is the owner of both) and are using the same OAuth token system that I set up originally. The service account itself created the file, so I am a little shocked that it can't then access the same file using the GDrive API.
My question is, is it not possible to use GDrive API to access Google Doc files, even when the files are within a GDrive folder? I can't seem to find any definitive information online on whether we specifically have to use the Google Docs API to access Docs files (seems silly if true). If it is possible, is there an alternative SCOPE that I need to assign to this service account to access Google Docs items specifically? Right now the only SCOPE assigned is https://www.googleapis.com/auth/drive, which according to documentation should be enough to access all of our GDrive files.
I can share some code, but there is not exactly a lot more than what I explained above. I would like to not have to entirely re-do my GDrive OAuth permissions if possible, as that took me a long time in the first place, but if that is the only way, I would love to hear suggestions.
Thanks!
I want to download a Google Sheet (and/or Doc, or Colab Notebook) from an "Anyone can View" sharing URL, if the file is newer than my local copy. To do that, I need to find out when the remote file was last modified. Which I thought shouldn't be hard.
There are threads explaining how to do this for regular files on websites that make use of the HTML Last-Modified property, but Google doesn't provide this field in its headers. It provides a Date: but that's just the download date/time that updates every moment.
I see threads about doing this from within the Doc or Sheet itself. My question is not about that. I'm talking about getting the info remotely by running a python script on my local machine.
I see a thread about using the Google Drive API v3, but....is it really necessary to go through all that (e.g. install oauth, register an API key, etc. effectively create an entire Google app *) just to find out when a publicly-available file was last modified? Is there an easier way?
Thanks!
EDIT: * I started down the road of Google Drive API but I find it confusing and overwhelming. It's like they think I'm trying to create an app for general users for the Android Store, instead of just myself. (??)
I have created a project using
https://developer.api.autodesk.com/hq/v1/accounts/:account_id/projects
and activate it.
Is there any option to DELETE the created project?
I have already seen that archiving via Patch is available.
Thank you!
According to the REST API design style, The HTTP method for deleting something will implement via DELETE. Unfortunately, it's not available in BIM360 HQ API currently.
Does anyone (you know who you are) know exactly what is disappearing when Autodesk deprecates the /v1 equivalent of the ModelDerivative API?
I've taken care of everything that was in the blog post here:
https://forge.autodesk.com/cloud_and_mobile/2016/09/autodesk-forge-apis-migrating-from-v1-to-v2.html
But I also have some calls such as:
/viewingservice/v1/:URN/status
and:
/viewingservice/v1/items/:dbpath object_ids.json.gz
That were not specifically mentioned. Will these also need to be modified?
These endpoints will no longer be valid. The status of a translation can be obtained by using the GET :urn/manifest endpoint.
We have official SDK's for multiple programming languages that will make it easier to handle the REST calls.
To download the derivatives of a model, the SDK's do not expose direct methods so you actually have to issue the calls "directly". Take a look at the extract.io sample that expose the full download workflow, more specifically there.
Hope that helps
I have been looking all day at the Google Drive SDK for Android,
but I am a bit confused.
I need to make the list of folders and files in the user Google Drive account.
I thought that was a simple, basic standard feature, but maybe not...
Please can you help me?
You have two possible ways to go:
use RESTful API, or
use Google Drive Android Api (GDAA)
I would say the former would be easier to start with.
If you decide to go with the REST, you may use the GitHub demo here, that has both the REST and the GDAA 'CRUD' implementations (you just comment out the one you don't need). It also has some code to deal with the authentication / authorization which you need to do anything on Google Drive. See SO 28439129.
In case you decide to use GDAA, (you still have to get the authorization done), the 'official' to get you started demos are here and here.
You will definitely run into a lot of roadblocks and the solutions are mostly found here under the tag 'google-drive-android-api'.
Good Luck.