Class DeveloperKnowledgeClientImpl
DeveloperKnowledge client wrapper implementation, for convenient use.
Inherited Members
Namespace: Google.Developers.DeveloperKnowledge.V1
Assembly: Google.Developers.DeveloperKnowledge.V1.dll
Syntax
public sealed class DeveloperKnowledgeClientImpl : DeveloperKnowledgeClient
Remarks
The Developer Knowledge API provides programmatic access to Google's public developer documentation, enabling you to integrate this knowledge base into your own applications and workflows.
The API is designed to be the canonical source for machine-readable access to Google's developer documentation.
A typical use case is to first use [DeveloperKnowledge.SearchDocumentChunks][google.developers.knowledge.v1.DeveloperKnowledge.SearchDocumentChunks] to find relevant page URIs based on a query, and then use [DeveloperKnowledge.GetDocument][google.developers.knowledge.v1.DeveloperKnowledge.GetDocument] or [DeveloperKnowledge.BatchGetDocuments][google.developers.knowledge.v1.DeveloperKnowledge.BatchGetDocuments] to fetch the full content of the top results.
All document content is provided in Markdown format.
Constructors
DeveloperKnowledgeClientImpl(DeveloperKnowledgeClient, DeveloperKnowledgeSettings, ILogger)
Constructs a client wrapper for the DeveloperKnowledge service, with the specified gRPC client and settings.
Declaration
public DeveloperKnowledgeClientImpl(DeveloperKnowledge.DeveloperKnowledgeClient grpcClient, DeveloperKnowledgeSettings settings, ILogger logger)
Parameters
| Type | Name | Description |
|---|---|---|
| DeveloperKnowledge.DeveloperKnowledgeClient | grpcClient | The underlying gRPC client. |
| DeveloperKnowledgeSettings | settings | The base DeveloperKnowledgeSettings used within this client. |
| ILogger | logger | Optional ILogger to use within this client. |
Properties
GrpcClient
The underlying gRPC DeveloperKnowledge client
Declaration
public override DeveloperKnowledge.DeveloperKnowledgeClient GrpcClient { get; }
Property Value
| Type | Description |
|---|---|
| DeveloperKnowledge.DeveloperKnowledgeClient |
Overrides
Methods
BatchGetDocuments(BatchGetDocumentsRequest, CallSettings)
Retrieves multiple documents, each with its full Markdown content.
Declaration
public override BatchGetDocumentsResponse BatchGetDocuments(BatchGetDocumentsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchGetDocumentsRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| BatchGetDocumentsResponse | The RPC response. |
Overrides
BatchGetDocumentsAsync(BatchGetDocumentsRequest, CallSettings)
Retrieves multiple documents, each with its full Markdown content.
Declaration
public override Task<BatchGetDocumentsResponse> BatchGetDocumentsAsync(BatchGetDocumentsRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| BatchGetDocumentsRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<BatchGetDocumentsResponse> | A Task containing the RPC response. |
Overrides
GetDocument(GetDocumentRequest, CallSettings)
Retrieves a single document with its full Markdown content.
Declaration
public override Document GetDocument(GetDocumentRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetDocumentRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Document | The RPC response. |
Overrides
GetDocumentAsync(GetDocumentRequest, CallSettings)
Retrieves a single document with its full Markdown content.
Declaration
public override Task<Document> GetDocumentAsync(GetDocumentRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| GetDocumentRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| Task<Document> | A Task containing the RPC response. |
Overrides
SearchDocumentChunks(SearchDocumentChunksRequest, CallSettings)
Searches for developer knowledge across Google's developer documentation. Returns [DocumentChunk][google.developers.knowledge.v1.DocumentChunk]s based on the user's query. There may be many chunks from the same [Document][google.developers.knowledge.v1.Document]. To retrieve full documents, use [DeveloperKnowledge.GetDocument][google.developers.knowledge.v1.DeveloperKnowledge.GetDocument] or [DeveloperKnowledge.BatchGetDocuments][google.developers.knowledge.v1.DeveloperKnowledge.BatchGetDocuments] with the [DocumentChunk.parent][google.developers.knowledge.v1.DocumentChunk.parent] returned in the [SearchDocumentChunksResponse.results][google.developers.knowledge.v1.SearchDocumentChunksResponse.results].
Declaration
public override PagedEnumerable<SearchDocumentChunksResponse, DocumentChunk> SearchDocumentChunks(SearchDocumentChunksRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchDocumentChunksRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedEnumerable<SearchDocumentChunksResponse, DocumentChunk> | A pageable sequence of DocumentChunk resources. |
Overrides
SearchDocumentChunksAsync(SearchDocumentChunksRequest, CallSettings)
Searches for developer knowledge across Google's developer documentation. Returns [DocumentChunk][google.developers.knowledge.v1.DocumentChunk]s based on the user's query. There may be many chunks from the same [Document][google.developers.knowledge.v1.Document]. To retrieve full documents, use [DeveloperKnowledge.GetDocument][google.developers.knowledge.v1.DeveloperKnowledge.GetDocument] or [DeveloperKnowledge.BatchGetDocuments][google.developers.knowledge.v1.DeveloperKnowledge.BatchGetDocuments] with the [DocumentChunk.parent][google.developers.knowledge.v1.DocumentChunk.parent] returned in the [SearchDocumentChunksResponse.results][google.developers.knowledge.v1.SearchDocumentChunksResponse.results].
Declaration
public override PagedAsyncEnumerable<SearchDocumentChunksResponse, DocumentChunk> SearchDocumentChunksAsync(SearchDocumentChunksRequest request, CallSettings callSettings = null)
Parameters
| Type | Name | Description |
|---|---|---|
| SearchDocumentChunksRequest | request | The request object containing all of the parameters for the API call. |
| CallSettings | callSettings | If not null, applies overrides to this RPC call. |
Returns
| Type | Description |
|---|---|
| PagedAsyncEnumerable<SearchDocumentChunksResponse, DocumentChunk> | A pageable asynchronous sequence of DocumentChunk resources. |