yahoo_gemini_client 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +18 -5
- data/README.md +4 -0
- data/lib/yahoo_gemini_client.rb +2 -0
- data/lib/yahoo_gemini_client/requests/ad_group_base_request.rb +1 -1
- data/lib/yahoo_gemini_client/requests/advertiser_base_request.rb +1 -1
- data/lib/yahoo_gemini_client/requests/advertisers_fetch_request.rb +16 -0
- data/lib/yahoo_gemini_client/requests/campaign_base_request.rb +1 -1
- data/lib/yahoo_gemini_client/requests/custom_report_base_request.rb +1 -1
- data/lib/yahoo_gemini_client/responses/advertisers_response.rb +13 -0
- data/lib/yahoo_gemini_client/services/advertisers.rb +4 -0
- data/lib/yahoo_gemini_client/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73b01b979a482ac94e77e93c118b2c153eb76181
|
4
|
+
data.tar.gz: 0e71443f1da5067f199513a96b7f9610f7087c61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f83ad012a665646751adbdabb27ef4adc2a45a3386dba9a3a2f1ef9535470016a6c62e30cfb2de4e1da7681212e69d9b0ed18f3e5b3d2e711643bcfbf626de21
|
7
|
+
data.tar.gz: 9ac1ffa959f1844231db00ce9eb6c56db05e62b48c51f8802cfdfaa8cfe257262fde3897633447324565b7972219f4078acadd3fcd9c49405dbf42eaa915d2bc
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,12 +1,25 @@
|
|
1
|
-
#
|
1
|
+
# Change Log
|
2
|
+
All notable changes to this project will be documented in this file.
|
2
3
|
|
3
|
-
|
4
|
+
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
5
|
+
and this project adheres to [Semantic Versioning](http://semver.org/).
|
6
|
+
|
7
|
+
## [0.2.0] - 2016-09-02
|
8
|
+
### Added
|
9
|
+
- Add Advertisers.all
|
4
10
|
|
5
|
-
|
11
|
+
### Changed
|
12
|
+
- Use v2 API
|
6
13
|
|
14
|
+
## [0.1.1]
|
15
|
+
### Fixed
|
16
|
+
- Make initialization follow what README states (no need to wrap `refresh_token` in a hash)
|
17
|
+
|
18
|
+
## [0.1.0]
|
19
|
+
### Added
|
7
20
|
- Add custom reports
|
8
21
|
- Refactor advertisers
|
9
22
|
|
10
|
-
|
11
|
-
|
23
|
+
## [0.0.1]
|
24
|
+
### Added
|
12
25
|
- Initial release
|
data/README.md
CHANGED
@@ -55,6 +55,10 @@ client = YahooGeminiClient::Client.new(
|
|
55
55
|
response = client.advertisers.find(123)
|
56
56
|
response.error? # check if response is error
|
57
57
|
response.advertiser # returns a YahooGeminiClient::Advertiser
|
58
|
+
|
59
|
+
response = client.advertisers.all
|
60
|
+
response.error? # check if response is error
|
61
|
+
response.advertisers # returns an array containing YahooGeminiClient::Advertiser
|
58
62
|
```
|
59
63
|
|
60
64
|
### Custom Reports
|
data/lib/yahoo_gemini_client.rb
CHANGED
@@ -14,6 +14,7 @@ require "yahoo_gemini_client/models/ad_group"
|
|
14
14
|
require "yahoo_gemini_client/services/ad_groups"
|
15
15
|
require "yahoo_gemini_client/responses/base_response"
|
16
16
|
require "yahoo_gemini_client/responses/advertiser_response"
|
17
|
+
require "yahoo_gemini_client/responses/advertisers_response"
|
17
18
|
require "yahoo_gemini_client/requests/base_request"
|
18
19
|
require "yahoo_gemini_client/requests/custom_report_base_request"
|
19
20
|
require "yahoo_gemini_client/requests/custom_report_job_request"
|
@@ -22,6 +23,7 @@ require "yahoo_gemini_client/requests/campaign_base_request"
|
|
22
23
|
require "yahoo_gemini_client/requests/campaign_fetch_request"
|
23
24
|
require "yahoo_gemini_client/requests/advertiser_base_request"
|
24
25
|
require "yahoo_gemini_client/requests/advertiser_fetch_request"
|
26
|
+
require "yahoo_gemini_client/requests/advertisers_fetch_request"
|
25
27
|
require "yahoo_gemini_client/requests/ad_group_base_request"
|
26
28
|
require "yahoo_gemini_client/requests/ad_group_fetch_request"
|
27
29
|
require "yahoo_gemini_client/responses/custom_report_response"
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module YahooGeminiClient
|
2
|
+
class AdvertisersFetchRequest < AdvertiserBaseRequest
|
3
|
+
|
4
|
+
def execute
|
5
|
+
response = get(request_uri: build_request_uri)
|
6
|
+
AdvertisersResponse.new(response.with_indifferent_access)
|
7
|
+
end
|
8
|
+
|
9
|
+
private
|
10
|
+
|
11
|
+
def build_request_uri
|
12
|
+
REQUEST_URI
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module YahooGeminiClient
|
2
2
|
class CustomReportBaseRequest < BaseRequest
|
3
|
-
REQUEST_URI = "https://api.admanager.yahoo.com/
|
3
|
+
REQUEST_URI = "https://api.admanager.yahoo.com/v2/rest/reports/custom"
|
4
4
|
include Virtus.model
|
5
5
|
|
6
6
|
def http_authorization_header
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module YahooGeminiClient
|
2
|
+
class AdvertisersResponse < BaseResponse
|
3
|
+
attr_accessor :errors, :timestamp, :advertisers
|
4
|
+
|
5
|
+
def initialize(json_response)
|
6
|
+
@errors = json_response[:errors]
|
7
|
+
@timestamp = json_response[:timestamp]
|
8
|
+
@advertisers = json_response[:response].map do |advertiser_hash|
|
9
|
+
Advertiser.new(advertiser_hash)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yahoo_gemini_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ramon Tayag
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-09-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: oauth2
|
@@ -239,6 +239,7 @@ files:
|
|
239
239
|
- lib/yahoo_gemini_client/requests/ad_group_fetch_request.rb
|
240
240
|
- lib/yahoo_gemini_client/requests/advertiser_base_request.rb
|
241
241
|
- lib/yahoo_gemini_client/requests/advertiser_fetch_request.rb
|
242
|
+
- lib/yahoo_gemini_client/requests/advertisers_fetch_request.rb
|
242
243
|
- lib/yahoo_gemini_client/requests/base_request.rb
|
243
244
|
- lib/yahoo_gemini_client/requests/campaign_base_request.rb
|
244
245
|
- lib/yahoo_gemini_client/requests/campaign_fetch_request.rb
|
@@ -247,6 +248,7 @@ files:
|
|
247
248
|
- lib/yahoo_gemini_client/requests/custom_report_job_request.rb
|
248
249
|
- lib/yahoo_gemini_client/responses/ad_group_response.rb
|
249
250
|
- lib/yahoo_gemini_client/responses/advertiser_response.rb
|
251
|
+
- lib/yahoo_gemini_client/responses/advertisers_response.rb
|
250
252
|
- lib/yahoo_gemini_client/responses/base_response.rb
|
251
253
|
- lib/yahoo_gemini_client/responses/campaign_response.rb
|
252
254
|
- lib/yahoo_gemini_client/responses/custom_report_response.rb
|
@@ -277,7 +279,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
277
279
|
version: '0'
|
278
280
|
requirements: []
|
279
281
|
rubyforge_project:
|
280
|
-
rubygems_version: 2.
|
282
|
+
rubygems_version: 2.5.1
|
281
283
|
signing_key:
|
282
284
|
specification_version: 4
|
283
285
|
summary: A Ruby Interface to the Yahoo Gemini API
|