### Install Drive V2 Client Source: https://github.com/googleapis/google-api-ruby-client/blob/main/docs/usage-guide.md Execute bundle to install the client after adding it to the Gemfile, or install it directly using gem install. ```bash $ bundle ``` ```bash $ gem install google-apis-drive_v2 ``` -------------------------------- ### Install Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-contentwarehouse_v1/OVERVIEW.md Execute bundle to install the gem after adding it to the Gemfile, or install it directly using the gem install command. ```bash $ bundle ``` ```bash $ gem install google-apis-contentwarehouse_v1 ``` -------------------------------- ### Install google-apis-discoveryengine_v1beta Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-discoveryengine_v1beta/OVERVIEW.md Add the gem to your Gemfile and run bundle, or install it directly using gem install. ```ruby gem 'google-apis-discoveryengine_v1beta', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-discoveryengine_v1beta ``` -------------------------------- ### Complete Cloud SQL Instance Listing Example Source: https://github.com/googleapis/google-api-ruby-client/blob/main/docs/oauth-server.md A full example demonstrating how to authenticate using application default credentials, build a Cloud SQL service, list instances, and print the result as a Hash. Ensure the necessary gems are required. ```ruby require 'googleauth' require 'google/apis/sqladmin_v1beta4' sqladmin = Google::Apis::SqladminV1beta4::SqladminService.new # Get the environment configured authorization scopes = ['https://www.googleapis.com/auth/sqlservice.admin'] sqladmin.authorization = Google::Auth.get_application_default(scopes) instances = sqladmin.list_instances('examinable-example-123') puts instances.to_h ``` -------------------------------- ### Setup AdSense Service with Installed App Flow Source: https://github.com/googleapis/google-api-ruby-client/blob/main/docs/auth-guide.md Sets up the AdSense service using the installed application flow, storing credentials to avoid re-authorization. FileStorage is not suitable for multi-user applications. ```ruby require "google/apis/adsense_v1_4" require "google/api_client/storage" require "google/api_client/oauth2core" # Handles authentication and loading of the API. def setup log_file = File.open('adsense.log', 'a+') log_file.sync = true logger = Logger.new(log_file) logger.level = Logger::DEBUG adsense = Google::Apis::AdsenseV1_4::AdSenseService.new # Stores auth credentials in a file, so they survive multiple runs # of the application. This avoids prompting the user for authorization every # time the access token expires, by remembering the refresh token. # Note: FileStorage is not suitable for multi-user applications. storage = Google::APIClient::Storage.new( Google::APIClient::FileStore.new(CREDENTIAL_STORE_FILE)) adsense.authorization = storage.authorize if storage.authorization.nil? client_secrets = Google::APIClient::ClientSecrets.load # The InstalledAppFlow is a helper class to handle the OAuth 2.0 installed # application flow, which ties in with Stroage to store credentials # between runs. flow = Google::APIClient::InstalledAppFlow.new( :client_id => client_secrets.client_id, :client_secret => client_secrets.client_secret, :scope => ['https://www.googleapis.com/auth/adsense.readonly']) adsense.authorization = flow.authorize(storage) end return adsense end # Generates a report for the default account. def generate_report(adsense) report = adsense.generate_report(start_date: '2011-01-01', end_date: '2011-08-31', metric: %w(PAGE_VIEWS AD_REQUESTS AD_REQUESTS_COVERAGE CLICKS AD_REQUESTS_CTR COST_PER_CLICK AD_REQUESTS_RPM EARNINGS), dimension: %w(DATE), sort: %w(+DATE)) # Display headers. report.headers.each do |header| print '%25s' % header.name end puts # Display results. report.rows.each do |row| row.each do |column| print '%25s' % column end puts end end if __FILE__ == $0 adsense = setup() generate_report(adsense) end ``` -------------------------------- ### List Available Sample Modules Source: https://github.com/googleapis/google-api-ruby-client/blob/main/samples/cli/README.md Run this command to see all available sample modules in the project. ```bash google-api-samples ``` -------------------------------- ### Full Installed Application Sample for AdSense API Source: https://github.com/googleapis/google-api-ruby-client/blob/main/docs/auth-guide.md This is a comprehensive Ruby script for the AdSense Management API using an installed application flow. It includes necessary requires, credential storage setup, and the authorization process. This sample is designed for command-line usage. ```ruby # AdSense Management API command-line sample. require 'google/apis/adsense_v1_4' require 'google/api_client/client_secrets' require 'google/api_client/auth/installed_app' require 'google/api_client/auth/storage' require 'google/api_client/auth/storages/file_store' require 'logger' require 'json' CREDENTIAL_STORE_FILE = "#{$0}-oauth2.json" ``` -------------------------------- ### Install google-apis-servicenetworking_v1beta Gem (Manual) Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-servicenetworking_v1beta/OVERVIEW.md Alternatively, install the gem directly using the gem command. ```bash $ gem install google-apis-servicenetworking_v1beta ``` -------------------------------- ### Initialize Installed App Flow for Authentication Source: https://github.com/googleapis/google-api-ruby-client/blob/main/docs/auth-guide.md This code initializes the `InstalledAppFlow` helper class, which simplifies the OAuth 2.0 setup for installed applications. It requires the client ID, client secret, and the desired API scopes. The `storage` parameter in `authorize` should be an instance of `Google::APIClient::Storage`. ```ruby flow = Google::APIClient::InstalledAppFlow.new( :client_id => client_secrets.client_id, :client_secret => client_secrets.client_secret, :scope => ['https://www.googleapis.com/auth/adsense.readonly'] ) ``` -------------------------------- ### Install the Recommendations AI Client Library Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-recommendationengine_v1beta1/OVERVIEW.md Add the gem to your application's Gemfile and run bundle, or install it directly using gem install. ```ruby gem 'google-apis-recommendationengine_v1beta1', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-recommendationengine_v1beta1 ``` -------------------------------- ### Get Help on Specific Samples Source: https://github.com/googleapis/google-api-ruby-client/blob/main/samples/cli/README.md Use this command to get detailed help for a particular sample module. ```bash google-api-samples help ``` -------------------------------- ### Install google-apis-oauth2_v2 Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-oauth2_v2/OVERVIEW.md Add the gem to your application's Gemfile and run bundle install, or install it directly using gem install. ```ruby gem 'google-apis-oauth2_v2', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-oauth2_v2 ``` -------------------------------- ### Create Deployment Manager V2beta Client Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-deploymentmanager_v2beta/OVERVIEW.md Load the client library and instantiate a service object. Authentication must be handled separately using the googleauth gem. ```ruby # Load the client require "google/apis/deploymentmanager_v2beta" # Create a client object client = Google::Apis::DeploymentmanagerV2beta::DeploymentManagerService.new # Authenticate calls client.authorization = # ... use the googleauth gem to create credentials ``` -------------------------------- ### Install google-apis-homegraph_v1 Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-homegraph_v1/OVERVIEW.md Add the gem to your application's Gemfile and run bundle install, or install it directly using gem install. ```ruby gem 'google-apis-homegraph_v1', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-homegraph_v1 ``` -------------------------------- ### Install Datapipelines V1 Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-datapipelines_v1/OVERVIEW.md Execute bundle to install the gem after adding it to your Gemfile, or install it directly using the gem install command. ```bash $ bundle ``` ```bash $ gem install google-apis-datapipelines_v1 ``` -------------------------------- ### Install Cloud Filestore V1beta1 Gem (Manual) Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-file_v1beta1/OVERVIEW.md Alternatively, install the gem directly using the gem command. ```bash $ gem install google-apis-file_v1beta1 ``` -------------------------------- ### Install google-apis-texttospeech_v1beta1 Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-texttospeech_v1beta1/OVERVIEW.md Add the gem to your application's Gemfile and run bundle install, or install it directly using the gem install command. ```ruby gem 'google-apis-texttospeech_v1beta1', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-texttospeech_v1beta1 ``` -------------------------------- ### Install google-apis-sqladmin_v1beta4 Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-sqladmin_v1beta4/OVERVIEW.md Add the gem to your application's Gemfile and execute bundle install, or install it directly using the gem install command. ```ruby gem 'google-apis-sqladmin_v1beta4', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-sqladmin_v1beta4 ``` -------------------------------- ### Run Sinatra Web App Sample Source: https://github.com/googleapis/google-api-ruby-client/blob/main/samples/web/README.md Start the Sinatra web server to explore the Google API client samples. Ensure a Redis server is running locally on port 6379. ```bash ruby app.rb ``` -------------------------------- ### Install google-apis-documentai_v1beta2 Gem (Standalone) Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-documentai_v1beta2/OVERVIEW.md Install the gem directly using the gem command. ```bash $ gem install google-apis-documentai_v1beta2 ``` -------------------------------- ### Install google-apis-secretmanager_v1 Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-secretmanager_v1/OVERVIEW.md Add the gem to your application's Gemfile and run bundle install, or install it directly using the gem install command. ```ruby gem 'google-apis-secretmanager_v1', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-secretmanager_v1 ``` -------------------------------- ### Create a Bare Metal Solution V1 Client Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-baremetalsolution_v1/OVERVIEW.md Load the client library and instantiate a BaremetalsolutionService object. Authentication must be handled separately using the googleauth gem. ```ruby # Load the client require "google/apis/baremetalsolution_v1" # Create a client object client = Google::Apis::BaremetalsolutionV1::BaremetalsolutionService.new # Authenticate calls client.authorization = # ... use the googleauth gem to create credentials ``` -------------------------------- ### Install google-apis-beyondcorp_v1 Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-beyondcorp_v1/OVERVIEW.md Add the gem to your application's Gemfile and execute bundle to install, or install it directly using the gem install command. ```ruby gem 'google-apis-beyondcorp_v1', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-beyondcorp_v1 ``` -------------------------------- ### Install Firebase Hosting V1beta1 Client Library Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-firebasehosting_v1beta1/OVERVIEW.md Add the gem to your application's Gemfile and execute bundle, or install it directly using the gem command. ```ruby gem 'google-apis-firebasehosting_v1beta1', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-firebasehosting_v1beta1 ``` -------------------------------- ### Install GKE Hub V2alpha Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-gkehub_v2alpha/OVERVIEW.md Add the gem to your application's Gemfile and execute bundle install, or install it directly using gem install. ```ruby gem 'google-apis-gkehub_v2alpha', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-gkehub_v2alpha ``` -------------------------------- ### Install Google Slides API V1 Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-slides_v1/OVERVIEW.md Add the gem to your application's Gemfile for installation. Execute bundle to install or use gem install directly. ```ruby gem 'google-apis-slides_v1', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-slides_v1 ``` -------------------------------- ### Install Smart Device Management V1 Gem Manually Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-smartdevicemanagement_v1/OVERVIEW.md Alternatively, install the gem directly using the gem install command. ```bash $ gem install google-apis-smartdevicemanagement_v1 ``` -------------------------------- ### Install My Business Place Actions V1 Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-mybusinessplaceactions_v1/OVERVIEW.md Add the gem to your application's Gemfile and execute bundle, or install it directly using the gem install command. ```ruby gem 'google-apis-mybusinessplaceactions_v1', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-mybusinessplaceactions_v1 ``` -------------------------------- ### Install the My Business Business Information V1 Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-mybusinessbusinessinformation_v1/OVERVIEW.md Add the gem to your application's Gemfile and run bundle install, or install it directly using gem install. ```ruby gem 'google-apis-mybusinessbusinessinformation_v1', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-mybusinessbusinessinformation_v1 ``` -------------------------------- ### Install Google APIs Content V2 Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-content_v2/OVERVIEW.md Add the gem to your application's Gemfile and run bundle install, or install it directly using gem install. ```ruby gem 'google-apis-content_v2', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-content_v2 ``` -------------------------------- ### Install Bare Metal Solution API Client Library Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-baremetalsolution_v1alpha1/OVERVIEW.md Add the gem to your application's Gemfile and execute bundle, or install it directly using gem install. ```ruby gem 'google-apis-baremetalsolution_v1alpha1', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-baremetalsolution_v1alpha1 ``` -------------------------------- ### Install Gem Manually Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-apigee_v1/OVERVIEW.md Alternatively, install the gem directly using the gem install command. ```bash $ gem install google-apis-apigee_v1 ``` -------------------------------- ### Create OS Config V2 Client Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-osconfig_v2/OVERVIEW.md Load the client library and instantiate a client object. Authentication is handled separately using the googleauth gem. ```ruby # Load the client require "google/apis/osconfig_v2" # Create a client object client = Google::Apis::OsconfigV2::OSConfigService.new # Authenticate calls client.authorization = # ... use the googleauth gem to create credentials ``` -------------------------------- ### Install Google APIs Translate V3beta1 Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-translate_v3beta1/OVERVIEW.md Add the gem to your application's Gemfile and run bundle install, or install it directly using the gem install command. ```ruby gem 'google-apis-translate_v3beta1', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-translate_v3beta1 ``` -------------------------------- ### Install the Cloud Scheduler Client Library Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-cloudscheduler_v1beta1/OVERVIEW.md Add the gem to your application's Gemfile and install it, or install it directly using the gem command. ```ruby gem 'google-apis-cloudscheduler_v1beta1', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-cloudscheduler_v1beta1 ``` -------------------------------- ### Install Google Forms API V1 Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-forms_v1/OVERVIEW.md Add the google-apis-forms_v1 gem to your application's Gemfile and run bundle install, or install it directly using gem install. ```ruby gem "google-apis-forms_v1", ">= 0.1" ``` ```bash $ bundle ``` ```bash $ gem install google-apis-forms_v1 ``` -------------------------------- ### Install Firebase ML API V1beta2 Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-firebaseml_v1beta2/OVERVIEW.md Add the gem to your application's Gemfile for installation via Bundler, or install it directly using the gem install command. ```ruby gem 'google-apis-firebaseml_v1beta2', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-firebaseml_v1beta2 ``` -------------------------------- ### Install the google-apis-cloudresourcemanager_v2beta1 Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-cloudresourcemanager_v2beta1/OVERVIEW.md Add this line to your application's Gemfile to include the client library. Execute `bundle` to install. ```ruby gem 'google-apis-cloudresourcemanager_v2beta1', '~> 0.1' ``` -------------------------------- ### Install Google APIs Dataportability V1 Gem (CLI) Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-dataportability_v1/OVERVIEW.md Alternatively, install the gem directly using the command line. ```bash $ gem install google-apis-dataportability_v1 ``` -------------------------------- ### Install Android Management API V1 Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-androidmanagement_v1/OVERVIEW.md Add the gem to your application's Gemfile and run bundle install, or install it directly using the gem install command. ```ruby gem 'google-apis-androidmanagement_v1', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-androidmanagement_v1 ``` -------------------------------- ### Install Google Play Android Publisher V3 Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-androidpublisher_v3/OVERVIEW.md Add the gem to your application's Gemfile and execute bundle install, or install it directly using the gem install command. ```ruby gem 'google-apis-androidpublisher_v3', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-androidpublisher_v3 ``` -------------------------------- ### Install Google Data Catalog V1beta1 Client Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-datacatalog_v1beta1/OVERVIEW.md Add the gem to your Gemfile for installation via Bundler, or install it directly using the gem command. ```ruby gem 'google-apis-datacatalog_v1beta1', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-datacatalog_v1beta1 ``` -------------------------------- ### Install google-apis-script_v1 Gem Manually Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-script_v1/OVERVIEW.md Alternatively, install the gem directly using the gem install command. ```bash $ gem install google-apis-script_v1 ``` -------------------------------- ### Install Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-speech_v2beta1/OVERVIEW.md Alternatively, you can install the gem directly using the gem command. ```bash $ gem install google-apis-speech_v2beta1 ``` -------------------------------- ### Install google-apis-cloudsearch_v1 Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-cloudsearch_v1/OVERVIEW.md Add the gem to your application's Gemfile for installation. Execute bundle to install. ```ruby gem 'google-apis-cloudsearch_v1', '~> 0.1' ``` -------------------------------- ### Install Smart Device Management V1 Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-smartdevicemanagement_v1/OVERVIEW.md Add the gem to your application's Gemfile for installation. Execute bundle to install the gem. ```ruby gem 'google-apis-smartdevicemanagement_v1', '~> 0.1' ``` -------------------------------- ### Install Service Directory V1 Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-servicedirectory_v1/OVERVIEW.md Add the Service Directory V1 gem to your application's Gemfile and execute bundle install, or install it directly using the gem install command. ```ruby gem 'google-apis-servicedirectory_v1', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-servicedirectory_v1 ``` -------------------------------- ### Initialize Drive Service and List Files Source: https://github.com/googleapis/google-api-ruby-client/blob/main/docs/usage-guide.md Require the Drive V2 library, instantiate the DriveService, set authorization, and search for files. ```ruby require 'google/apis/drive_v2' drive = Google::Apis::DriveV2::DriveService.new drive.authorization = ... # See Googleauth or Signet libraries # Search for files in Drive (first page only) files = drive.list_files(q: "title contains 'finances'") files.items.each do |file| puts file.title end ``` -------------------------------- ### Install Security Command Center V1beta1 Client Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-securitycenter_v1beta1/OVERVIEW.md Add the gem to your application's Gemfile for installation via Bundler, or install it directly using the gem command. ```ruby gem 'google-apis-securitycenter_v1beta1', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-securitycenter_v1beta1 ``` -------------------------------- ### Install the Google APIs My Business Business Calls V1 Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-mybusinessbusinesscalls_v1/OVERVIEW.md Add the gem to your application's Gemfile and execute bundle install, or install it directly using the gem install command. ```ruby gem 'google-apis-mybusinessbusinesscalls_v1', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-mybusinessbusinesscalls_v1 ``` -------------------------------- ### Install Identity Toolkit V1 Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-identitytoolkit_v1/OVERVIEW.md Add the Identity Toolkit V1 gem to your application's Gemfile and execute bundle install, or install it directly using the gem install command. ```ruby gem 'google-apis-identitytoolkit_v1', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-identitytoolkit_v1 ``` -------------------------------- ### Install GKE Hub V1beta1 Client Library Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-gkehub_v1beta1/OVERVIEW.md Add the gem to your application's Gemfile for installation via Bundler, or install it directly using the gem command. ```ruby gem 'google-apis-gkehub_v1beta1', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-gkehub_v1beta1 ``` -------------------------------- ### Install google-apis-texttospeech_v1 Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-texttospeech_v1/OVERVIEW.md Add the gem to your Gemfile and execute bundle, or install it directly using gem install. ```ruby gem 'google-apis-texttospeech_v1', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-texttospeech_v1 ``` -------------------------------- ### Create and Authenticate a My Business Business Information Service Client Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-mybusinessbusinessinformation_v1/OVERVIEW.md Load the client library and instantiate a service object. Use the googleauth gem to set up credentials for authenticating API calls. ```ruby # Load the client require "google/apis/mybusinessbusinessinformation_v1" # Create a client object client = Google::Apis::MybusinessbusinessinformationV1::MyBusinessBusinessInformationService.new # Authenticate calls client.authorization = # ... use the googleauth gem to create credentials ``` -------------------------------- ### Install google-apis-speech_v1 Gem Source: https://github.com/googleapis/google-api-ruby-client/blob/main/generated/google-apis-speech_v1/OVERVIEW.md Add the gem to your Gemfile and execute bundle, or install it directly using gem install. ```ruby gem 'google-apis-speech_v1', '~> 0.1' ``` ```bash $ bundle ``` ```bash $ gem install google-apis-speech_v1 ```