blob: 03529abb9140922f660956d8cd9f7ea792224211 [file] [log] [blame]
John Asmuth614db982014-04-24 15:46:26 -04001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="drive_v2.html">Drive API</a> . <a href="drive_v2.children.html">children</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#delete">delete(folderId, childId)</a></code></p>
79<p class="firstline">Removes a child from a folder.</p>
80<p class="toc_element">
81 <code><a href="#get">get(folderId, childId)</a></code></p>
82<p class="firstline">Gets a specific child reference.</p>
83<p class="toc_element">
84 <code><a href="#insert">insert(folderId, body)</a></code></p>
85<p class="firstline">Inserts a file into a folder.</p>
86<p class="toc_element">
Takashi Matsuo06694102015-09-11 13:55:40 -070087 <code><a href="#list">list(folderId, orderBy=None, q=None, pageToken=None, maxResults=None)</a></code></p>
John Asmuth614db982014-04-24 15:46:26 -040088<p class="firstline">Lists a folder's children.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<h3>Method Details</h3>
93<div class="method">
94 <code class="details" id="delete">delete(folderId, childId)</code>
95 <pre>Removes a child from a folder.
96
97Args:
98 folderId: string, The ID of the folder. (required)
99 childId: string, The ID of the child. (required)
100</pre>
101</div>
102
103<div class="method">
104 <code class="details" id="get">get(folderId, childId)</code>
105 <pre>Gets a specific child reference.
106
107Args:
108 folderId: string, The ID of the folder. (required)
109 childId: string, The ID of the child. (required)
110
111Returns:
112 An object of the form:
113
114 { # A reference to a folder's child.
115 "kind": "drive#childReference", # This is always drive#childReference.
116 "childLink": "A String", # A link to the child.
117 "id": "A String", # The ID of the child.
118 "selfLink": "A String", # A link back to this reference.
119 }</pre>
120</div>
121
122<div class="method">
123 <code class="details" id="insert">insert(folderId, body)</code>
124 <pre>Inserts a file into a folder.
125
126Args:
127 folderId: string, The ID of the folder. (required)
128 body: object, The request body. (required)
129 The object takes the form of:
130
131{ # A reference to a folder's child.
132 "kind": "drive#childReference", # This is always drive#childReference.
133 "childLink": "A String", # A link to the child.
134 "id": "A String", # The ID of the child.
135 "selfLink": "A String", # A link back to this reference.
136 }
137
138
139Returns:
140 An object of the form:
141
142 { # A reference to a folder's child.
143 "kind": "drive#childReference", # This is always drive#childReference.
144 "childLink": "A String", # A link to the child.
145 "id": "A String", # The ID of the child.
146 "selfLink": "A String", # A link back to this reference.
147 }</pre>
148</div>
149
150<div class="method">
Takashi Matsuo06694102015-09-11 13:55:40 -0700151 <code class="details" id="list">list(folderId, orderBy=None, q=None, pageToken=None, maxResults=None)</code>
John Asmuth614db982014-04-24 15:46:26 -0400152 <pre>Lists a folder's children.
153
154Args:
155 folderId: string, The ID of the folder. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700156 orderBy: string, A comma-separated list of sort keys. Valid keys are 'createdDate', 'folder', 'lastViewedByMeDate', 'modifiedByMeDate', 'modifiedDate', 'quotaBytesUsed', 'recency', 'sharedWithMeDate', 'starred', and 'title'. Each key sorts ascending by default, but may be reversed with the 'desc' modifier. Example usage: ?orderBy=folder,modifiedDate desc,title. Please note that there is a current limitation for users with approximately one million files in which the requested sort order is ignored.
John Asmuth614db982014-04-24 15:46:26 -0400157 q: string, Query string for searching children.
158 pageToken: string, Page token for children.
159 maxResults: integer, Maximum number of children to return.
160
161Returns:
162 An object of the form:
163
164 { # A list of children of a file.
165 "nextPageToken": "A String", # The page token for the next page of children.
166 "kind": "drive#childList", # This is always drive#childList.
167 "items": [ # The actual list of children.
168 { # A reference to a folder's child.
169 "kind": "drive#childReference", # This is always drive#childReference.
170 "childLink": "A String", # A link to the child.
171 "id": "A String", # The ID of the child.
172 "selfLink": "A String", # A link back to this reference.
173 },
174 ],
175 "nextLink": "A String", # A link to the next page of children.
176 "etag": "A String", # The ETag of the list.
177 "selfLink": "A String", # A link back to this list.
178 }</pre>
179</div>
180
181<div class="method">
182 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
183 <pre>Retrieves the next page of results.
184
185Args:
186 previous_request: The request for the previous page. (required)
187 previous_response: The response from the request for the previous page. (required)
188
189Returns:
190 A request object that you can call 'execute()' on to request the next
191 page. Returns None if there are no more items in the collection.
192 </pre>
193</div>
194
195</body></html>