Diese Seite wurde von der Cloud Translation API übersetzt.
Switch to English

Keyword automatisch ausfüllen (v3)

Geben Sie automatisch das Präfix für das Such-Keyword ein.

Codebeispiel

Ruby

# project_id     = "Project id required"
# company_name   = "The company's name which the job belongs to. The format is "projects/{project_id}/companies/{company_id}""
# query          = "Keyword prefix as auto complete query"

require "google/apis/jobs_v3"

jobs = Google::Apis::JobsV3
talent_solution_client = jobs::CloudTalentSolutionService.new
talent_solution_client.authorization = Google::Auth.get_application_default(
  "https://www.googleapis.com/auth/jobs"
)

page_size = 10
language_code = "en-US"
result = talent_solution_client.complete_project(
  project_id, company_name: company_name, page_size: page_size, query: query,
  language_code: language_code
) do |result, err|
  if err.nil?
    puts "Default auto complete result: #{result.to_json}"
  else
    puts "Error when auto completing. Error message: #{err.to_json}"
  end
end