google-ads-googleads 1.1.0 → 1.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 +4 -0
- data/README.md +9 -8
- data/Rakefile +33 -0
- data/lib/google/ads/google_ads/logging_interceptor.rb +1 -1
- data/lib/google/ads/google_ads/utils/v1/proto_lookup_util.rb +1 -0
- data/lib/google/ads/google_ads/v1/resources/detail_placement_view_pb.rb +1 -1
- data/lib/google/ads/google_ads/v1/resources/group_placement_view_pb.rb +1 -1
- data/lib/google/ads/google_ads/v1/resources/product_bidding_category_constant_pb.rb +1 -1
- data/lib/google/ads/google_ads/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d909d1d6d9386d5ce00534af05b6ce762f3f981a4242aa501f3a884ed8f82695
|
4
|
+
data.tar.gz: 88cef4570b6123d494d04d13ac64c42abc540e87fbf1426186982480c29f8109
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f13b5d6f77f0bb1a9aa061365e9459507a3990301e7d25b5cce1b3ff945b4335c2bbc1f53465aa821b7281e08bac00f987d61d451d120500baf0cfe8f8f92246
|
7
|
+
data.tar.gz: 73d88a624bfdb3ec1dad7772057c8ac9418cea5459e0ed13786f7bee964f3c94823145fe39931f7350e952eb128b2e7a42cfb014bfad66c58f6f3420888e56d6
|
data/ChangeLog
CHANGED
data/README.md
CHANGED
@@ -49,23 +49,23 @@ See and run the [Authentication example][] to generate your refresh token.
|
|
49
49
|
Once this is generated, you can provide it to the library in a few different
|
50
50
|
ways.
|
51
51
|
|
52
|
-
The simplest is to copy the [
|
52
|
+
The simplest is to copy the [google_ads_config.rb][] to your home directory and
|
53
53
|
simply modify it to include the client ID, client secret, and refresh token.
|
54
54
|
The library will automatically read it from the home directory if instantiated
|
55
55
|
with no arguments:
|
56
56
|
|
57
|
-
|
57
|
+
client = Google::Ads::GoogleAds::GoogleAdsClient.new
|
58
58
|
|
59
59
|
Alternatively, if you prefer to keep the file elsewhere, you can instantiate the
|
60
60
|
library by passing the path to where you keep this file:
|
61
61
|
|
62
|
-
|
62
|
+
client = Google::Ads::GoogleAds::GoogleAdsClient.new('path/to/file.rb')
|
63
63
|
|
64
64
|
If you prefer not to store this information in a file at all, and would rather
|
65
65
|
pass the information programmatically at runtime, you can accomplish that this
|
66
66
|
way:
|
67
67
|
|
68
|
-
|
68
|
+
client = Google::Ads::GoogleAds::GoogleAdsClient.new do |config|
|
69
69
|
config.client_id = 'INSERT_CLIENT_ID_HERE'
|
70
70
|
config.client_secret = 'INSERT_CLIENT_SECRET_HERE'
|
71
71
|
config.refresh_token = 'INSERT_REFRESH_TOKEN_HERE'
|
@@ -73,11 +73,11 @@ way:
|
|
73
73
|
end
|
74
74
|
|
75
75
|
You can also modify these properties after instantiation by using the
|
76
|
-
`configure` method on the `
|
76
|
+
`configure` method on the `GoogleAdsClient`, using the same structure as above.
|
77
77
|
|
78
78
|
[Authorization guide]: https://developers.google.com/google-ads/api/docs/oauth/overview
|
79
79
|
[Authentication example]: https://github.com/googleads/google-ads-ruby/blob/master/examples/authentication/authenticate_in_standalone_application.rb
|
80
|
-
[
|
80
|
+
[google_ads_config.rb]: https://github.com/googleads/google-ads-ruby/blob/master/google_ads_config.rb
|
81
81
|
|
82
82
|
## Usage
|
83
83
|
|
@@ -87,8 +87,8 @@ To include the gem in your code:
|
|
87
87
|
|
88
88
|
To fetch a specific service, for example CampaignService:
|
89
89
|
|
90
|
-
|
91
|
-
campaign_service =
|
90
|
+
client = Google::Ads::GoogleAds::GoogleAdsClient.new
|
91
|
+
campaign_service = client.service(:Campaign)
|
92
92
|
|
93
93
|
See the provided [examples][] for more detailed demonstrations of how to use the
|
94
94
|
library.
|
@@ -116,3 +116,4 @@ Author:
|
|
116
116
|
Maintainer:
|
117
117
|
|
118
118
|
- Michael Cloonan
|
119
|
+
- Sam Phippen
|
data/Rakefile
CHANGED
@@ -5,3 +5,36 @@ require 'rake/testtask'
|
|
5
5
|
Rake::TestTask.new do |t|
|
6
6
|
t.test_files = FileList['test/**/test_*.rb']
|
7
7
|
end
|
8
|
+
|
9
|
+
def apply_patches
|
10
|
+
clean = system(<<~EOD)
|
11
|
+
bash -c 'if [ -z "$(git status --porcelain)" ]; then exit 0; else exit 1; fi'
|
12
|
+
EOD
|
13
|
+
|
14
|
+
raise "Working directory is not clean" unless clean
|
15
|
+
|
16
|
+
patches = Dir["patches/*.patch"]
|
17
|
+
patches.each do |patch|
|
18
|
+
puts "PATCH #{patch}"
|
19
|
+
res = system("git apply #{patch}")
|
20
|
+
if res
|
21
|
+
`git add -u`
|
22
|
+
`git commit -m 'Applying #{patch} for v#{Google::Ads::GoogleAds::CLIENT_LIB_VERSION} release'`
|
23
|
+
else
|
24
|
+
puts "FAIL #{patch}: may not be a big deal because already applied or no longer needed"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
task :validate_protos do
|
30
|
+
res = system("./scripts/validate_protos.rb")
|
31
|
+
if !res
|
32
|
+
raise "Couldn't load all protos"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
task :apply_patches do |t|
|
37
|
+
apply_patches
|
38
|
+
end
|
39
|
+
|
40
|
+
task :build => [:apply_patches, :validate_protos]
|
@@ -44,7 +44,7 @@ module Google
|
|
44
44
|
@logger.debug(build_request_message(metadata, request))
|
45
45
|
@logger.debug(build_success_response_message(response))
|
46
46
|
if response.respond_to?(:partial_failure_error) && response.partial_failure_error
|
47
|
-
@logger.
|
47
|
+
@logger.debug(build_partial_failure_message(response))
|
48
48
|
end
|
49
49
|
response
|
50
50
|
rescue Exception
|
@@ -678,6 +678,7 @@ module Google
|
|
678
678
|
Customer: ['customer_service_pb', 'CustomerOperation'],
|
679
679
|
ConversionAction: ['conversion_action_service_pb', 'ConversionActionOperation'],
|
680
680
|
DismissRecommendation: ['recommendation_service_pb', 'DismissRecommendationRequest::DismissRecommendationOperation'],
|
681
|
+
ExtensionFeedItem: ['extension_feed_item_service_pb', 'ExtensionFeedItemOperation'],
|
681
682
|
ExtensionFeedItemOperation: ['extension_feed_item_service_pb', 'ExtensionFeedItemOperation'],
|
682
683
|
FeedItem: ['feed_item_service_pb', 'FeedItemOperation'],
|
683
684
|
FeedItemTarget: ['feed_item_target_service_pb', 'FeedItemTargetOperation'],
|
@@ -17,6 +17,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
module Google::Ads::GoogleAds::V1::
|
20
|
+
module Google::Ads::GoogleAds::V1::Resources
|
21
21
|
DetailPlacementView = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.DetailPlacementView").msgclass
|
22
22
|
end
|
@@ -16,6 +16,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
-
module Google::Ads::GoogleAds::V1::
|
19
|
+
module Google::Ads::GoogleAds::V1::Resources
|
20
20
|
GroupPlacementView = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.GroupPlacementView").msgclass
|
21
21
|
end
|
@@ -20,6 +20,6 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
-
module Google::Ads::GoogleAds::V1::
|
23
|
+
module Google::Ads::GoogleAds::V1::Resources
|
24
24
|
ProductBiddingCategoryConstant = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v1.resources.ProductBiddingCategoryConstant").msgclass
|
25
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-ads-googleads
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-gax
|