Debian Codegraph @

docs/dyn/developerknowledge_v1.documents.html

raw
1 <html><body>
2 <style>
3
4 body, 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
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, 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="developerknowledge_v1.html">Developer Knowledge API</a> . <a href="developerknowledge_v1.documents.html">documents</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="#batchGet">batchGet(names=None, view=None, x__xgafv=None)</a></code></p>
79 <p class="firstline">Retrieves multiple documents, each with its full Markdown content.</p>
80 <p class="toc_element">
81 <code><a href="#close">close()</a></code></p>
82 <p class="firstline">Close httplib2 connections.</p>
83 <p class="toc_element">
84 <code><a href="#get">get(name, view=None, x__xgafv=None)</a></code></p>
85 <p class="firstline">Retrieves a single document with its full Markdown content.</p>
86 <p class="toc_element">
87 <code><a href="#searchDocumentChunks">searchDocumentChunks(filter=None, pageSize=None, pageToken=None, query=None, x__xgafv=None)</a></code></p>
88 <p class="firstline">Searches for developer knowledge across Google's developer documentation. Returns DocumentChunks based on the user's query. There may be many chunks from the same Document. To retrieve full documents, use DeveloperKnowledge.GetDocument or DeveloperKnowledge.BatchGetDocuments with the DocumentChunk.parent returned in the SearchDocumentChunksResponse.results.</p>
89 <p class="toc_element">
90 <code><a href="#searchDocumentChunks_next">searchDocumentChunks_next()</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="batchGet">batchGet(names=None, view=None, x__xgafv=None)</code>
95 <pre>Retrieves multiple documents, each with its full Markdown content.
96
97 Args:
98 names: string, Required. Specifies the names of the documents to retrieve. A maximum of 20 documents can be retrieved in a batch. The documents are returned in the same order as the `names` in the request. Format: `documents/{uri_without_scheme}` Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` (repeated)
99 view: string, Optional. Specifies the DocumentView of the document. If unspecified, DeveloperKnowledge.BatchGetDocuments defaults to `DOCUMENT_VIEW_CONTENT`.
100 Allowed values
101 DOCUMENT_VIEW_UNSPECIFIED - The default / unset value. See each API method for its default value if DocumentView is not specified.
102 DOCUMENT_VIEW_BASIC - Includes only the basic metadata fields: - `name` - `uri` - `data_source` - `title` - `description` - `update_time` - `view` This is the default of view for DeveloperKnowledge.SearchDocumentChunks.
103 DOCUMENT_VIEW_FULL - Includes all Document fields.
104 DOCUMENT_VIEW_CONTENT - Includes the `DOCUMENT_VIEW_BASIC` fields and the `content` field. This is the default of view for DeveloperKnowledge.GetDocument and DeveloperKnowledge.BatchGetDocuments.
105 x__xgafv: string, V1 error format.
106 Allowed values
107 1 - v1 error format
108 2 - v2 error format
109
110 Returns:
111 An object of the form:
112
113 { # Response message for DeveloperKnowledge.BatchGetDocuments.
114 &quot;documents&quot;: [ # Contains the documents requested.
115 { # A Document represents a piece of content from the Developer Knowledge corpus.
116 &quot;content&quot;: &quot;A String&quot;, # Output only. Contains the full content of the document in Markdown format.
117 &quot;dataSource&quot;: &quot;A String&quot;, # Output only. Specifies the data source of the document. Example data source: `firebase.google.com`
118 &quot;description&quot;: &quot;A String&quot;, # Output only. Provides a description of the document.
119 &quot;name&quot;: &quot;A String&quot;, # Identifier. Contains the resource name of the document. Format: `documents/{uri_without_scheme}` Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets`
120 &quot;title&quot;: &quot;A String&quot;, # Output only. Provides the title of the document.
121 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Represents the timestamp when the content or metadata of the document was last updated.
122 &quot;uri&quot;: &quot;A String&quot;, # Output only. Provides the URI of the content, such as `docs.cloud.google.com/storage/docs/creating-buckets`.
123 &quot;view&quot;: &quot;A String&quot;, # Output only. Specifies the DocumentView of the document.
124 },
125 ],
126 }</pre>
127 </div>
128
129 <div class="method">
130 <code class="details" id="close">close()</code>
131 <pre>Close httplib2 connections.</pre>
132 </div>
133
134 <div class="method">
135 <code class="details" id="get">get(name, view=None, x__xgafv=None)</code>
136 <pre>Retrieves a single document with its full Markdown content.
137
138 Args:
139 name: string, Required. Specifies the name of the document to retrieve. Format: `documents/{uri_without_scheme}` Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets` (required)
140 view: string, Optional. Specifies the DocumentView of the document. If unspecified, DeveloperKnowledge.GetDocument defaults to `DOCUMENT_VIEW_CONTENT`.
141 Allowed values
142 DOCUMENT_VIEW_UNSPECIFIED - The default / unset value. See each API method for its default value if DocumentView is not specified.
143 DOCUMENT_VIEW_BASIC - Includes only the basic metadata fields: - `name` - `uri` - `data_source` - `title` - `description` - `update_time` - `view` This is the default of view for DeveloperKnowledge.SearchDocumentChunks.
144 DOCUMENT_VIEW_FULL - Includes all Document fields.
145 DOCUMENT_VIEW_CONTENT - Includes the `DOCUMENT_VIEW_BASIC` fields and the `content` field. This is the default of view for DeveloperKnowledge.GetDocument and DeveloperKnowledge.BatchGetDocuments.
146 x__xgafv: string, V1 error format.
147 Allowed values
148 1 - v1 error format
149 2 - v2 error format
150
151 Returns:
152 An object of the form:
153
154 { # A Document represents a piece of content from the Developer Knowledge corpus.
155 &quot;content&quot;: &quot;A String&quot;, # Output only. Contains the full content of the document in Markdown format.
156 &quot;dataSource&quot;: &quot;A String&quot;, # Output only. Specifies the data source of the document. Example data source: `firebase.google.com`
157 &quot;description&quot;: &quot;A String&quot;, # Output only. Provides a description of the document.
158 &quot;name&quot;: &quot;A String&quot;, # Identifier. Contains the resource name of the document. Format: `documents/{uri_without_scheme}` Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets`
159 &quot;title&quot;: &quot;A String&quot;, # Output only. Provides the title of the document.
160 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Represents the timestamp when the content or metadata of the document was last updated.
161 &quot;uri&quot;: &quot;A String&quot;, # Output only. Provides the URI of the content, such as `docs.cloud.google.com/storage/docs/creating-buckets`.
162 &quot;view&quot;: &quot;A String&quot;, # Output only. Specifies the DocumentView of the document.
163 }</pre>
164 </div>
165
166 <div class="method">
167 <code class="details" id="searchDocumentChunks">searchDocumentChunks(filter=None, pageSize=None, pageToken=None, query=None, x__xgafv=None)</code>
168 <pre>Searches for developer knowledge across Google&#x27;s developer documentation. Returns DocumentChunks based on the user&#x27;s query. There may be many chunks from the same Document. To retrieve full documents, use DeveloperKnowledge.GetDocument or DeveloperKnowledge.BatchGetDocuments with the DocumentChunk.parent returned in the SearchDocumentChunksResponse.results.
169
170 Args:
171 filter: string, Optional. Applies a strict filter to the search results. The expression supports a subset of the syntax described at https://google.aip.dev/160. While `SearchDocumentChunks` returns DocumentChunks, the filter is applied to `DocumentChunk.document` fields. Supported fields for filtering: * `data_source` (STRING): The source of the document, e.g. `docs.cloud.google.com`. See https://developers.google.com/knowledge/reference/corpus-reference for the complete list of data sources in the corpus. * `update_time` (TIMESTAMP): The timestamp of when the document was last meaningfully updated. A meaningful update is one that changes document&#x27;s markdown content or metadata. * `uri` (STRING): The document URI, e.g. `https://docs.cloud.google.com/bigquery/docs/tables`. STRING fields support `=` (equals) and `!=` (not equals) operators for **exact match** on the whole string. Partial match, prefix match, and regexp match are not supported. TIMESTAMP fields support `=`, `&lt;`, `&lt;=`, `&gt;`, and `&gt;=` operators. Timestamps must be in RFC-3339 format, e.g., `&quot;2025-01-01T00:00:00Z&quot;`. You can combine expressions using `AND`, `OR`, and `NOT` (or `-`) logical operators. `OR` has higher precedence than `AND`. Use parentheses for explicit precedence grouping. Examples: * `data_source = &quot;docs.cloud.google.com&quot; OR data_source = &quot;firebase.google.com&quot;` * `data_source != &quot;firebase.google.com&quot;` * `update_time &lt; &quot;2024-01-01T00:00:00Z&quot;` * `update_time &gt;= &quot;2025-01-22T00:00:00Z&quot; AND (data_source = &quot;developer.chrome.com&quot; OR data_source = &quot;web.dev&quot;)` * `uri = &quot;https://docs.cloud.google.com/release-notes&quot;` The `filter` string must not exceed 500 characters; values longer than 500 characters will result in an `INVALID_ARGUMENT` error.
172 pageSize: integer, Optional. Specifies the maximum number of results to return. The service may return fewer than this value. If unspecified, at most 5 results will be returned. The maximum value is 20; values above 20 will result in an INVALID_ARGUMENT error.
173 pageToken: string, Optional. Contains a page token, received from a previous `SearchDocumentChunks` call. Provide this to retrieve the subsequent page.
174 query: string, Required. Provides the raw query string provided by the user, such as &quot;How to create a Cloud Storage bucket?&quot;.
175 x__xgafv: string, V1 error format.
176 Allowed values
177 1 - v1 error format
178 2 - v2 error format
179
180 Returns:
181 An object of the form:
182
183 { # Response message for DeveloperKnowledge.SearchDocumentChunks.
184 &quot;nextPageToken&quot;: &quot;A String&quot;, # Optional. Provides a token that can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.
185 &quot;results&quot;: [ # Contains the search results for the given query. Each DocumentChunk in this list contains a snippet of content relevant to the search query. Use the DocumentChunk.parent field of each result with DeveloperKnowledge.GetDocument or DeveloperKnowledge.BatchGetDocuments to retrieve the full document content.
186 { # A DocumentChunk represents a piece of content from a Document in the DeveloperKnowledge corpus. To fetch the entire document content, pass the `parent` to DeveloperKnowledge.GetDocument or DeveloperKnowledge.BatchGetDocuments.
187 &quot;content&quot;: &quot;A String&quot;, # Output only. Contains the content of the document chunk.
188 &quot;document&quot;: { # A Document represents a piece of content from the Developer Knowledge corpus. # Output only. Represents metadata about the Document this chunk is from. The DocumentView of this Document message will be set to `DOCUMENT_VIEW_BASIC`. It is included here for convenience so that clients do not need to call DeveloperKnowledge.GetDocument or DeveloperKnowledge.BatchGetDocuments if they only need the metadata fields. Otherwise, clients should use DeveloperKnowledge.GetDocument or DeveloperKnowledge.BatchGetDocuments to fetch the full document content.
189 &quot;content&quot;: &quot;A String&quot;, # Output only. Contains the full content of the document in Markdown format.
190 &quot;dataSource&quot;: &quot;A String&quot;, # Output only. Specifies the data source of the document. Example data source: `firebase.google.com`
191 &quot;description&quot;: &quot;A String&quot;, # Output only. Provides a description of the document.
192 &quot;name&quot;: &quot;A String&quot;, # Identifier. Contains the resource name of the document. Format: `documents/{uri_without_scheme}` Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets`
193 &quot;title&quot;: &quot;A String&quot;, # Output only. Provides the title of the document.
194 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Represents the timestamp when the content or metadata of the document was last updated.
195 &quot;uri&quot;: &quot;A String&quot;, # Output only. Provides the URI of the content, such as `docs.cloud.google.com/storage/docs/creating-buckets`.
196 &quot;view&quot;: &quot;A String&quot;, # Output only. Specifies the DocumentView of the document.
197 },
198 &quot;id&quot;: &quot;A String&quot;, # Output only. Specifies the ID of this chunk within the document. The chunk ID is unique within a document, but not globally unique across documents. The chunk ID is not stable and may change over time.
199 &quot;parent&quot;: &quot;A String&quot;, # Output only. Contains the resource name of the document this chunk is from. Format: `documents/{uri_without_scheme}` Example: `documents/docs.cloud.google.com/storage/docs/creating-buckets`
200 },
201 ],
202 }</pre>
203 </div>
204
205 <div class="method">
206 <code class="details" id="searchDocumentChunks_next">searchDocumentChunks_next()</code>
207 <pre>Retrieves the next page of results.
208
209 Args:
210 previous_request: The request for the previous page. (required)
211 previous_response: The response from the request for the previous page. (required)
212
213 Returns:
214 A request object that you can call &#x27;execute()&#x27; on to request the next
215 page. Returns None if there are no more items in the collection.
216 </pre>
217 </div>
218
219 </body></html>