Class: Google::Apis::DeveloperknowledgeV1::DeveloperKnowledgeService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::DeveloperknowledgeV1::DeveloperKnowledgeService
- Defined in:
- lib/google/apis/developerknowledge_v1/service.rb
Overview
Developer Knowledge API
The Developer Knowledge API provides access to Google's developer knowledge.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://developerknowledge.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#batch_document_get(names: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DeveloperknowledgeV1::BatchGetDocumentsResponse
Retrieves multiple documents, each with its full Markdown content.
-
#get_document(name, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DeveloperknowledgeV1::Document
Retrieves a single document with its full Markdown content.
-
#initialize ⇒ DeveloperKnowledgeService
constructor
A new instance of DeveloperKnowledgeService.
-
#search_document_document_chunks(filter: nil, page_size: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DeveloperknowledgeV1::SearchDocumentChunksResponse
Searches for developer knowledge across Google's developer documentation.
Constructor Details
#initialize ⇒ DeveloperKnowledgeService
Returns a new instance of DeveloperKnowledgeService.
47 48 49 50 51 52 |
# File 'lib/google/apis/developerknowledge_v1/service.rb', line 47 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-developerknowledge_v1', client_version: Google::Apis::DeveloperknowledgeV1::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
40 41 42 |
# File 'lib/google/apis/developerknowledge_v1/service.rb', line 40 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
45 46 47 |
# File 'lib/google/apis/developerknowledge_v1/service.rb', line 45 def quota_user @quota_user end |
Instance Method Details
#batch_document_get(names: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DeveloperknowledgeV1::BatchGetDocumentsResponse
Retrieves multiple documents, each with its full Markdown content.
80 81 82 83 84 85 86 87 88 89 |
# File 'lib/google/apis/developerknowledge_v1/service.rb', line 80 def batch_document_get(names: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/documents:batchGet', ) command.response_representation = Google::Apis::DeveloperknowledgeV1::BatchGetDocumentsResponse::Representation command.response_class = Google::Apis::DeveloperknowledgeV1::BatchGetDocumentsResponse command.query['names'] = names unless names.nil? command.query['view'] = view unless view.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_document(name, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DeveloperknowledgeV1::Document
Retrieves a single document with its full Markdown content.
116 117 118 119 120 121 122 123 124 125 |
# File 'lib/google/apis/developerknowledge_v1/service.rb', line 116 def get_document(name, view: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/{+name}', ) command.response_representation = Google::Apis::DeveloperknowledgeV1::Document::Representation command.response_class = Google::Apis::DeveloperknowledgeV1::Document command.params['name'] = name unless name.nil? command.query['view'] = view unless view.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#search_document_document_chunks(filter: nil, page_size: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::DeveloperknowledgeV1::SearchDocumentChunksResponse
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.
184 185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/google/apis/developerknowledge_v1/service.rb', line 184 def search_document_document_chunks(filter: nil, page_size: nil, page_token: nil, query: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v1/documents:searchDocumentChunks', ) command.response_representation = Google::Apis::DeveloperknowledgeV1::SearchDocumentChunksResponse::Representation command.response_class = Google::Apis::DeveloperknowledgeV1::SearchDocumentChunksResponse command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['query'] = query unless query.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |