Reference documentation and code samples for the Developer Knowledge API module Google::Developers::DeveloperKnowledge.
Methods
.developer_knowledge
def self.developer_knowledge(version: :v1, transport: :grpc, &block) -> ::ObjectCreate a new client object for DeveloperKnowledge.
By default, this returns an instance of
Google::Developers::DeveloperKnowledge::V1::DeveloperKnowledge::Client
for a gRPC client for version V1 of the API.
However, you can specify a different API version by passing it in the
version parameter. If the DeveloperKnowledge service is
supported by that API version, and the corresponding gem is available, the
appropriate versioned client will be returned.
You can also specify a different transport by passing :rest or :grpc in
the transport parameter.
Raises an exception if the currently installed versioned client gem for the given API version does not support the given transport of the DeveloperKnowledge service. You can determine whether the method will succeed by calling DeveloperKnowledge.developer_knowledge_available?.
About DeveloperKnowledge
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 to find relevant page URIs based on a query, and then use DeveloperKnowledge.GetDocument or DeveloperKnowledge.BatchGetDocuments to fetch the full content of the top results.
All document content is provided in Markdown format.
-
version (::String, ::Symbol) (defaults to: :v1) — The API version to connect to. Optional.
Defaults to
:v1. -
transport (:grpc, :rest) (defaults to: :grpc) — The transport to use. Defaults to
:grpc.
- (::Object) — A client object for the specified version.
.developer_knowledge_available?
def self.developer_knowledge_available?(version: :v1, transport: :grpc) -> booleanDetermines whether the DeveloperKnowledge service is supported by the current client. If true, you can retrieve a client object by calling DeveloperKnowledge.developer_knowledge. If false, that method will raise an exception. This could happen if the given API version does not exist or does not support the DeveloperKnowledge service, or if the versioned client gem needs an update to support the DeveloperKnowledge service.
-
version (::String, ::Symbol) (defaults to: :v1) — The API version to connect to. Optional.
Defaults to
:v1. -
transport (:grpc, :rest) (defaults to: :grpc) — The transport to use. Defaults to
:grpc.
- (boolean) — Whether the service is available.
Constants
VERSION
value: "0.2.0"