Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
google-ads-googleads
Advanced tools
google-ads-googleads
uses Google API extensions to provide an
easy-to-use client library for the Google Ads API.
For thorough documentation of all features and utilities, visit our Developers site Ruby guide.
The developer site also contains a
list
of which google-ads-googleads
gem version you would need to use for each API version.
google-ads-googleads
will allow you to connect to the
Google Ads API and access all its methods.
The recommended way to install is using bundler.
Add a line to your Gemfile
(replacing x.y.z with the version number
you're interested in):
gem 'google-ads-googleads', '~> x.y.z'
Then run:
$ bundle install
This will cause bundler to update your Gemfile.lock
locking to the exact
version of the gem, and all dependencies of the gem that were installed.
Using the pessimistic version operator "~> x.y.z"
will cause bundle update
to only install new versions in the x.y.*
series, which will
make it so you must manually opt into new versions.
You can then update to a new version of the gem by updating the Gemfile
.
If you are not using bundler, you can use one of these options.
Install this library using gem:
$ [sudo] gem install google-ads-googleads
Download the gem from the Releases page and install it from the local file:
$ [sudo] gem install google-ads-googleads-[version].gem
To authenticate your API calls, you need to specify your client ID, client secret, refresh token, and developer token to the library.
See the Developer token guide to obtain your developer token, if you don't already have one.
See the Authorization guide to generate a client ID and client secret, if you don't already have them.
Run the Authentication example to generate your refresh token.
Copy google_ads_config.rb to your home directory and modify it to include the client ID, client secret, and refresh token.
The client will automatically read it from the home directory if instantiated with no arguments:
client = Google::Ads::GoogleAds::GoogleAdsClient.new
Alternatively, if you prefer to keep the file elsewhere, you can instantiate the client by passing the path to where you keep this file:
client = Google::Ads::GoogleAds::GoogleAdsClient.new('path/to/google_ads_config.rb')
If you prefer not to store this information in a file at all, and would rather pass the information programmatically at runtime, you can accomplish that this way:
client = Google::Ads::GoogleAds::GoogleAdsClient.new do |config|
config.client_id = 'INSERT_CLIENT_ID_HERE'
config.client_secret = 'INSERT_CLIENT_SECRET_HERE'
config.refresh_token = 'INSERT_REFRESH_TOKEN_HERE'
config.developer_token = 'INSERT_DEVELOPER_TOKEN_HERE'
end
Find out more at the Configuration guide.
To include the gem in your code:
require 'google/ads/google_ads'
To fetch a specific service, for example CampaignService:
client = Google::Ads::GoogleAds::GoogleAdsClient.new
campaign_service = client.service.campaign
See the provided examples for more detailed demonstrations of how to use the library.
Note: You can ignore comments with [START...]
and [END...]
in
examples—they are specifically used by Google.
Once you're familiar with the examples, we also recommend familiarizing yourself with factories, which provides a set of high level convenience methods for working with the Google Ads API
See the Logging guide.
The client library supports versions 3.1, 3.2, and 3.3 of Ruby. We plan to support three Ruby releases at any one time. As Ruby releases once a year on December 25th, we will look at dropping support for the oldest version early in the following year.
Older versions of Ruby may still work with the library once our official support ends. However, we will not actively fix bugs for unsupported Ruby versions. If you run into an issue on an older version of Ruby, be sure to upgrade to a new version and test again before filing an issue.
Authors:
Maintainers:
FAQs
Unknown package
We found that google-ads-googleads demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.