tubemogul_api 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a645e8b0668ec676a3ef2d692cac307b305d2aed11c4c47793c94600e9218725
4
- data.tar.gz: 3da2f7b60a2357ee9771196aaae7407a6a062b2a1e5100a4efe8d5fae6cf1e5a
3
+ metadata.gz: d2e1519f1957b277a44b3ecce353c8a302532ea5193fecae14637c5b68ddad4e
4
+ data.tar.gz: 393f3e3d5227a2f777c2c24dff1300b983827216967b4f4943cace5c2084dfc1
5
5
  SHA512:
6
- metadata.gz: 8bd2916d7288cbe65e63ca92426ff92a4b5f806052e37be99bf7c33a51096bcd9dfd996982a7c6e671d19a06065758377b6a31232ecdc5ae4be476ee897f994b
7
- data.tar.gz: f393d5346b5edcba9f314d30424b1825276a586b5f3940e6ce0c60ff43e66381784cee2d735a154eaadbac37e26dcf19d286b69a5fae5a604f9103f370ae59e5
6
+ metadata.gz: 14f313a8579fc4089b41af18f8b349569c8db07bdac9c238f92b881bb9bf696bce884242626a3df8dc4febfde15ffa85307d2787383033b6049d0eae03130f3e
7
+ data.tar.gz: 97a69b46260abafea0277001be81494de7de8375dc6cad738b11dbb5cf74af9756771b482b96944a0265f1d0eb97d61348dbbe6ebd99f4e38e3fe039d5966905
@@ -7,7 +7,7 @@ jobs:
7
7
  build:
8
8
  docker:
9
9
  # specify the version you desire here
10
- - image: circleci/ruby:2.5.1-node-browsers
10
+ - image: circleci/ruby:2.5.3-node-browsers
11
11
 
12
12
  # Specify service dependencies here if necessary
13
13
  # CircleCI maintains a library of pre-built images
data/.env CHANGED
@@ -3,3 +3,5 @@ TUBEMOGUL_SECRET_KEY: 'tubemogul-secret-key'
3
3
  ACCOUNT_ID: '123456'
4
4
  SAMPLE_ADVERTISER_ID: 'sample-advertiser-id'
5
5
  SAMPLE_CAMPAIGN_ID: 'sample-campaign-id'
6
+ SAMPLE_MEDIA_PLACEMENT_ID: 'sample-media-placement-id'
7
+ SAMPLE_PLACEMENT_ID: 'sample-placement-id'
@@ -0,0 +1 @@
1
+ 2.5.3
@@ -6,10 +6,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.2.0] (2018-11-05)
10
+ ### Added
11
+ - Reporting API
12
+ - Placement API
13
+
9
14
  ## [0.1.0] (2018-10-18)
10
15
  ### Added
11
16
  - Advertisers API
12
17
  - Campaigns API
13
18
 
14
- [Unreleased]: https://github.com/ad2games/tubemogul_api/compare/v0.1.0...HEAD
19
+ [Unreleased]: https://github.com/ad2games/tubemogul_api/compare/v0.2.0...HEAD
20
+ [0.2.0]: https://github.com/ad2games/tubemogul_api/compare/v0.1.0...v0.2.0
15
21
  [0.1.0]: https://github.com/ad2games/tubemogul_api/commits/v0.1.0
data/README.md CHANGED
@@ -37,22 +37,17 @@ service.get(10) # returns the advertiser with the ID 10
37
37
  service.get_all # returns all advertisers
38
38
  ```
39
39
 
40
- Also the `spec/integration` directory contains examples.
40
+ Note: Currently only `get` and `get_all` requests are implemented and for a limited set of services.
41
+ Check `lib/tubemogul_api/service` directory to see which services are available.
41
42
 
42
- Note: Only the `Advertiser` and `Campaign` services with `get` and `get_all` requests are implemented so far.
43
+ Also the `spec/integration` directory contains usage examples.
43
44
 
44
45
  ## Development
45
46
 
46
47
  Run specs with `bundle exec rspec`.
47
48
 
48
- To recreate or create new VCR episodes, you need to set proper values for env vars:
49
- * `TUBEMOGUL_CLIENT_ID`
50
- * `TUBEMOGUL_SECRET_KEY`
51
- * `SAMPLE_ADVERTISER_ID`
52
- * `ACCOUNT_ID`
53
- * `SAMPLE_CAMPAIGN_ID`
54
-
55
- We recommend that you set it in `.env.test` file.
49
+ To recreate or create new VCR episodes, you need to set proper values for env vars. Check .env to
50
+ see the list of env variables required. We recommend that you set it in `.env.test` file.
56
51
 
57
52
  Note that some specs fail when recording new VCR episodes due to filtering of sensitive data.
58
53
  But after that, all specs should pass in playback mode.
@@ -1,3 +1,5 @@
1
1
  service:
2
2
  advertiser: 'v3/trafficking/advertisers'
3
3
  campaign: 'v3/trafficking/campaigns'
4
+ placement: 'v3/trafficking/placements'
5
+ reporting: 'v2/reporting'
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class TubemogulApi::Connection
4
- TUBEMOGUL_API_URL = 'https://api.tubemogul.com'.freeze
4
+ TUBEMOGUL_API_URL = 'https://api.tubemogul.com'
5
5
 
6
6
  attr_reader :config
7
7
 
@@ -40,8 +40,8 @@ class TubemogulApi::Service
40
40
  end
41
41
 
42
42
  def parse_response(response)
43
- case response['@type']
44
- when 'Collection'
43
+ case response['@type']&.downcase
44
+ when 'collection'
45
45
  parse_collection(response)
46
46
  else
47
47
  OpenStruct.new(response)
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class TubemogulApi::Service::Placement < TubemogulApi::Service
4
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ class TubemogulApi::Service::Reporting < TubemogulApi::Service
4
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TubemogulApi
4
- VERSION = '0.1.0'.freeze
4
+ VERSION = '0.2.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tubemogul_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guilherme Goettems Schneider
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-22 00:00:00.000000000 Z
11
+ date: 2018-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -133,6 +133,7 @@ files:
133
133
  - ".env"
134
134
  - ".gitignore"
135
135
  - ".rspec"
136
+ - ".ruby-version"
136
137
  - CHANGELOG.md
137
138
  - CODE_OF_CONDUCT.md
138
139
  - Gemfile
@@ -149,6 +150,8 @@ files:
149
150
  - lib/tubemogul_api/service.rb
150
151
  - lib/tubemogul_api/service/advertiser.rb
151
152
  - lib/tubemogul_api/service/campaign.rb
153
+ - lib/tubemogul_api/service/placement.rb
154
+ - lib/tubemogul_api/service/reporting.rb
152
155
  - lib/tubemogul_api/version.rb
153
156
  - tubemogul_api.gemspec
154
157
  homepage: https://www.combostrike.com