Google Drive / List files in folder - google-drive-api

I have little question. Is there any way (I read API, but maybe...) how to list files in folder using only Google Drive API? I mean without scopes Documents List API.
If I send request GET https://www.googleapis.com/drive/v2/files then I get all files and folders in my Google Drive, but I want to show only files which is inside specific folder.
My english is bad, but I hope you understand me.
If not any way to do this, then I must use Documents List API.
Thanks for answers
PS: I make app in C++/QT for MeeGo and Symbian OS mobile systems

Solved. I must use Search string parameters with =q

Related

Downloading images from Google Drive based on last letter of the file name

I have folders of images saved on Google Drive and I need to download only the images ending with the letter Z.
Here are a few examples:
DJI_20210405134404_0037_Z.JPG
DJI_20210405134404_0037_W.JPG
DJI_20210405134346_0036_Z.JPG
DJI_20210405134346_0036_W.JPG
Is there a clever way to do this with an API or other methods?
Here is the example made in Laravel where using google Drive API users can filter the files based on the requirements and download multiple files.
https://github.com/jd-patel/laravel-google-drive

Is there anyway to use the Google Drive API to list which files are sharable to anyone with a link or are publicly searchable?

I currently have a lot of files in Google Drive and would like to programmatically find which ones might be available to the web or available to those with the link of a file. I'd like to search which files were set to "Anyone with the link" or "Public on the web". The picture below shows this. Is there a way to easily list this with the Drive v3 API?
You just have to call Files: list and use the search query parameter (q) to list only the files with certain visibility settings. For example, if you want to retrieve both the files shared with anyone with link and anyone on the Internet, you can set q the following way:
q: "visibility='anyoneCanFind' or visibility='anyoneWithLink'"
From the docs:
visibility (=, '!='): The visibility level of the file. Valid values are anyoneCanFind, anyoneWithLink, domainCanFind, domainWithLink, and limited.
Note:
The rest of parameters provided to Files: list will depend on the exact search you want to make (from your Drive, from a shared Drive, etc.). I'm assuming this is not part of your question.
Reference:
Files: list
Search query terms

How to grab files from Google Drive with PHP?

I just need a starting place. How would you grab files from Google Drive with PHP? So, you would result in this:
<audio src='Google Drive File'></audio>
I'm just starting programming. Any help would be appreciated...
Are you manually sharing just a few specific files or do you want to fetch the file's link dynamically/using lookups, etc.?
For the first, you can use the Google Drive Direct Link Generator.
The other option is to modify the URL yourself so that something with a shared link like https://drive.google.com/file/d/FILE_ID/edit?usp=sharing becomes https://drive.google.com/uc?export=download&id=FILE_ID.
If purely non-manual and only in PHP, use the Drive SDK for PHP (beta) or via the REST API, has PHP examples.

Generate a google doc via Java

I've been swimming through searches and tutorials and guides and references for days, and I can't seem to find a good way to generate google docs via Java.
I can generate/import .txt files as regular google doc files successfully with java using the drive api, but that's only text files; I need to at least include unordered lists and links in the doc for it to be useful.
My next attempt would be to generate a .rtf or a .doc and then try to import that into google docs, but before I embark on such a project, I wanted to ask you guys first. I also see the realtime api, but it looks like it doesn't specifically deal with docs, just arbitrary data.
What's the recommended way to upload a new google doc with lists and links and stuff?
Thanks!
Probably the simplest import format would be HTML. Just set convert=true and you should be good to go.
There is no stand-alone API for creating or manipulating the contents of Google Docs files. As you've found, you can create documents in other formats and import them with the Drive API.
If you don't need to work in Java, the other option is to use Google Apps Script, which provides a service for creating and manipulating Google Docs files. More information in this guide.

Google drive and confidential files

I have been looking for quite some time and cannot seem to find the answer I need. I tried using the iframe tag method for Google Docs Viewer to view my files and noticed that pptx, xlsx, etc... PDF seems to be the only one that is visible. So I came to the conclusion I have to use Google Drive and it's API. If that is so, my question is... Can I keep these files hosted on my clients server and use the API to view the files or do they have to be hosted on Google Drive's cloud server? Thank you.
No, this is not possible, sorry. All files are stored on the Google Drive cloud servers.