Skip to content

Commit f093d12

Browse files
committed
Remove build directory changes
1 parent 5e5f48e commit f093d12

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

docs/quickstart.rst

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ Run this code with *python quickstart.py* and you will see a web browser asking
3434
.. _`APIs Console`: https://console.developers.google.com/iam-admin/projects
3535
.. _`OAuth made easy`: ./oauth.html
3636

37-
Creating and updating file
38-
--------------------------
37+
Creating and Updating Files
38+
---------------------------
3939

4040
There are many methods to create and update file metadata and contents. With *PyDrive2*, all you have to know is
4141
`Upload()`_ method which makes optimal API call for you. Add the following code to your *quickstart.py* and run it.
@@ -57,8 +57,8 @@ This code will create a new file with title *Hello.txt* and its content *Hello W
5757
.. _`Google Drive`: https://drive.google.com
5858
.. _`File management made easy`: ./filemanagement.html
5959

60-
Getting list of files
61-
---------------------
60+
Listing Files
61+
-------------
6262

6363
*PyDrive2* handles paginations and parses response as list of `GoogleDriveFile`_. Let's get title and id of all the files in the root folder of Google Drive. Again, add the following code to *quickstart.py* and execute it.
6464

@@ -84,23 +84,26 @@ GoogleDrive treats everything as a file and assigns different mimetypes for diff
8484
return newFolder
8585
8686
87-
Get Id of the title
88-
-------------------
87+
Return File ID via File Title
88+
-----------------------------
8989

90-
``get_id_of_title`` is a function that return id of the given title's file in the directory.
90+
A common task is providing the Google Drive API with a file id.
91+
``get_id_of_title`` demonstrates a simple workflow to return the id of a file handle by searching the file titles in a
92+
given directory. The function takes two arguments, ``title`` and ``parent_directory_id``. ``title`` is a string that
93+
will be compared against file titles included in a directory identified by the ``parent_directory_id``.
9194

9295
.. code-block:: python
9396
9497
def get_id_of_title(title,parent_directory_id):
9598
foldered_list=drive.ListFile({'q': "'"+parent_directory_id+"' in parents and trashed=false"}).GetList()
9699
for file in foldered_list:
97-
if(file['title']==title):
98-
return file['id']
99-
return None
100+
if(file['title']==title):
101+
return file['id']
102+
return None
100103
101-
folder browser
104+
Browse Folders
102105
--------------
103-
This return a json output of the data in the directory with some important attributes like size, title, parent_id etc
106+
This returns a json output of the data in a directory with some important attributes like size, title, parent_id.
104107

105108
.. code-block:: python
106109
@@ -136,7 +139,7 @@ This return a json output of the data in the directory with some important attri
136139
137140
here ``folder_list`` is the list of folders that is present
138141
139-
You will see title and id of all the files and folders in root folder of your Google Drive. For more details, take a look at documentation: `File listing made easy`_
142+
You will see title and id of all the files and folders in root folder of your Google Drive. For more details, refer to the documentation: `File listing made easy`_
140143
141144
.. _`GoogleDriveFile`: ./pydrive2.html#pydrive2.files.GoogleDriveFile
142145
.. _`File listing made easy`: ./filelist.html

0 commit comments

Comments
 (0)