google-ads-googleads 2.0.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +6 -0
- data/README.md +5 -0
- data/Rakefile +6 -1
- data/google_ads_config.rb +33 -11
- data/lib/google/ads/google_ads/config.rb +5 -0
- data/lib/google/ads/google_ads/factories/v1/enums.rb +2379 -0
- data/lib/google/ads/google_ads/factories/v1/operations.rb +3582 -0
- data/lib/google/ads/google_ads/factories/v1/resources.rb +5406 -0
- data/lib/google/ads/google_ads/factories/v1/services.rb +1815 -0
- data/lib/google/ads/google_ads/factories.rb +32 -0
- data/lib/google/ads/google_ads/field_mask_util.rb +1 -1
- data/lib/google/ads/google_ads/google_ads_client.rb +58 -26
- data/lib/google/ads/google_ads/version.rb +1 -1
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 164db641c982021a9c51f5b3bf9e18a65f8e7b973338bd392b003d00f5235cc7
|
4
|
+
data.tar.gz: f84eeceb7819e6751d8b897eb92423bf9145df1118971033a7794d687690f199
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9896edaac0beb4a622c4d1c7df3df42ad58767770772b8365afa275f045667d5ae0f5c808f3248077560386e966bad0ee9bd58281b1e5af41079d2cc2ccae5e0
|
7
|
+
data.tar.gz: e26923a7bc61d68228b1de9ab79d679c50c8e4ed97d9b80bda4eb3eeebe41eb0620f2ca833a63eb96a77961e0fac6e14ac6569512a37b5192921511a2b2ce839
|
data/ChangeLog
CHANGED
data/README.md
CHANGED
@@ -113,7 +113,12 @@ To fetch a specific service, for example CampaignService:
|
|
113
113
|
See the provided [examples][] for more detailed demonstrations of how to use the
|
114
114
|
library.
|
115
115
|
|
116
|
+
Once you're familiar with the [examples][], we also recommend familiarizing
|
117
|
+
yourself with [factories][], which provides a set of high level convenience
|
118
|
+
methods for working with the Google Ads API
|
119
|
+
|
116
120
|
[examples]: https://github.com/googleads/google-ads-ruby/blob/master/examples
|
121
|
+
[factories]: https://developers.google.com/google-ads/api/docs/client-libs/ruby/factories
|
117
122
|
|
118
123
|
## Logging
|
119
124
|
|
data/Rakefile
CHANGED
data/google_ads_config.rb
CHANGED
@@ -1,15 +1,39 @@
|
|
1
1
|
# This is an example configuration file for the Google Ads API Ruby client
|
2
2
|
# library.
|
3
|
-
#
|
3
|
+
# Copy it to your home directory and fill in all the required values.
|
4
4
|
|
5
5
|
Google::Ads::GoogleAds::Config.new do |c|
|
6
|
-
#
|
6
|
+
# The developer token is required to authenticate that you are allowed to
|
7
|
+
# make API calls.
|
8
|
+
c.developer_token = 'INSERT_DEVELOPER_TOKEN_HERE'
|
9
|
+
|
10
|
+
# Authentication tells the API that you are allowed to make changes to the
|
11
|
+
# specific account you're trying to access.
|
12
|
+
# The default method of authentication is to use a refresh token, client id,
|
13
|
+
# and client secret to generate an access token.
|
7
14
|
c.client_id = 'INSERT_CLIENT_ID_HERE'
|
8
15
|
c.client_secret = 'INSERT_CLIENT_SECRET_HERE'
|
9
16
|
c.refresh_token = 'INSERT_REFRESH_TOKEN_HERE'
|
10
|
-
c.developer_token = 'INSERT_DEVELOPER_TOKEN_HERE'
|
11
17
|
|
12
|
-
#
|
18
|
+
# Alternatively, you may specify your own custom authentication, which can be:
|
19
|
+
# A `Google::Auth::Credentials` uses a the properties of its represented
|
20
|
+
# keyfile for authenticating requests made by this client.
|
21
|
+
# A `String` will be treated as the path to the keyfile to be used for the
|
22
|
+
# construction of credentials for this client.
|
23
|
+
# A `Hash` will be treated as the contents of a keyfile to be used for the
|
24
|
+
# construction of credentials for this client.
|
25
|
+
# A `GRPC::Core::Channel` will be used to make calls through.
|
26
|
+
# A `GRPC::Core::ChannelCredentials` for the setting up the RPC client. The
|
27
|
+
# channel credentials should already be composed with a
|
28
|
+
# `GRPC::Core::CallCredentials` object.
|
29
|
+
# A `Proc` will be used as an updater_proc for the Grpc channel. The proc
|
30
|
+
# transforms the metadata for requests, generally, to give OAuth credentials.
|
31
|
+
# To use one of these methods, uncomment the following line and add some code
|
32
|
+
# to look up one of the authentication methods listed above. If set, the
|
33
|
+
# authentication field will override the client_id, client_secret, and
|
34
|
+
# refresh_token fields above.
|
35
|
+
# c.authentication = INSERT_AUTHENTICATION_METHOD_HERE
|
36
|
+
|
13
37
|
# Required for manager accounts only: Specify the login customer ID used to
|
14
38
|
# authenticate API calls. This will be the customer ID of the authenticated
|
15
39
|
# manager account. If you need to use different values for this field, then
|
@@ -17,9 +41,8 @@ Google::Ads::GoogleAds::Config.new do |c|
|
|
17
41
|
# value.
|
18
42
|
# c.login_customer_id = 'INSERT_LOGIN_CUSTOMER_ID_HERE'
|
19
43
|
|
20
|
-
# Logging-related fields.
|
21
|
-
#
|
22
|
-
# use your custom logger instead, exactly as you configured it.
|
44
|
+
# Logging-related fields. You may also specify a logger after instantiation
|
45
|
+
# by using client.logger=.
|
23
46
|
|
24
47
|
# By default, only log warnings or errors. You can change this to 'INFO' to
|
25
48
|
# log all requests and responses from the server.
|
@@ -32,9 +55,8 @@ Google::Ads::GoogleAds::Config.new do |c|
|
|
32
55
|
# or an open file.
|
33
56
|
c.log_target = STDOUT
|
34
57
|
|
35
|
-
# Instead of specifying logging through level and target, you can also
|
36
|
-
#
|
37
|
-
#
|
38
|
-
# log_target
|
58
|
+
# Instead of specifying logging through level and target, you can also pass a
|
59
|
+
# logger directly (e.g. passing Rails.logger in a config/initializer). The
|
60
|
+
# passed logger will override log_level and log_target.
|
39
61
|
# c.logger = Logger.new(STDOUT)
|
40
62
|
end
|
@@ -23,6 +23,8 @@ module Google
|
|
23
23
|
attr_accessor :refresh_token
|
24
24
|
attr_accessor :client_id
|
25
25
|
attr_accessor :client_secret
|
26
|
+
attr_accessor :authentication
|
27
|
+
|
26
28
|
attr_accessor :developer_token
|
27
29
|
attr_accessor :login_customer_id
|
28
30
|
|
@@ -34,12 +36,15 @@ module Google
|
|
34
36
|
@refresh_token = nil
|
35
37
|
@client_id = nil
|
36
38
|
@client_secret = nil
|
39
|
+
@authentication = nil
|
40
|
+
|
37
41
|
@developer_token = nil
|
38
42
|
@login_customer_id = nil
|
39
43
|
|
40
44
|
@log_level = nil
|
41
45
|
@log_target = nil
|
42
46
|
@logger = nil
|
47
|
+
|
43
48
|
yield self if block_given?
|
44
49
|
end
|
45
50
|
|