yt 0.25.27 → 0.25.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +8 -0
- data/lib/yt/collections/assets.rb +2 -2
- data/lib/yt/version.rb +1 -1
- data/spec/requests/as_content_owner/content_owner_spec.rb +14 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f5225a260b20a42c5267d7ac69892341117ec016
|
|
4
|
+
data.tar.gz: f725638a687b3e8b56e4b3365fa3133a06bfef08
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c746f90b1935c597d4492da130bf73e4234f29706ce7ce60d3aebebf69c4e7119b062c0c01e5579b507102f251fb55bcafea20961885cd741261d468a81f1221
|
|
7
|
+
data.tar.gz: 9162f375f49dc2130a7189c716f00bf3b4e9f9dbd09f100a65590aebe43e76444fb10fea3d3701b95db57f70a38bbfc19a957ddff5390411d9a57d26ec2ca2d4
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,10 @@ For more information about changelogs, check
|
|
|
6
6
|
[Keep a Changelog](http://keepachangelog.com) and
|
|
7
7
|
[Vandamme](http://tech-angels.github.io/vandamme).
|
|
8
8
|
|
|
9
|
+
## 0.25.28 - 2016-04-05
|
|
10
|
+
|
|
11
|
+
* [BUGFIX] If no asset ID is set, calling ContentOwner#assets will now use the path, /youtube/partner/v1/assetSearch, instead of '/youtube/partner/v1/assets'
|
|
12
|
+
|
|
9
13
|
## 0.25.27 - 2016-03-28
|
|
10
14
|
|
|
11
15
|
* [FEATURE] Add `comment_threads` association to Yt::Video.
|
data/README.md
CHANGED
|
@@ -71,6 +71,7 @@ Use [Yt::ContentOwner](http://www.rubydoc.info/gems/yt/Yt/Models/ContentOwner) t
|
|
|
71
71
|
* list and delete the references administered by the content owner
|
|
72
72
|
* list the policies and policy rules administered by the content owner
|
|
73
73
|
* create assets
|
|
74
|
+
* list assets
|
|
74
75
|
|
|
75
76
|
```ruby
|
|
76
77
|
# Content owners can be initialized with access token, refresh token or an authorization code
|
|
@@ -95,6 +96,13 @@ content_owner.policies.first.rules.first.action #=> "monetize"
|
|
|
95
96
|
content_owner.policies.first.rules.first.included_territories #=> ["US", "CA"]
|
|
96
97
|
|
|
97
98
|
content_owner.create_asset type: 'web' #=> #<Yt::Models::Asset @id=...>
|
|
99
|
+
|
|
100
|
+
content_owner.assets.first #=> #<Yt::Models::AssetSnippet:0x007ff2bc543b00 @id=...>
|
|
101
|
+
content_owner.assets.first.id #=> "A4532885163805730"
|
|
102
|
+
content_owner.assets.first.title #=> "Money Train"
|
|
103
|
+
content_owner.assets.first.type #=> "web"
|
|
104
|
+
content_owner.assets.first.custom_id #=> "MoKNJFOIRroc"
|
|
105
|
+
|
|
98
106
|
```
|
|
99
107
|
|
|
100
108
|
*All the above methods require authentication (see below).*
|
|
@@ -39,7 +39,7 @@ module Yt
|
|
|
39
39
|
# is accessed; it should be replaced with a filter on params instead.
|
|
40
40
|
def assets_path
|
|
41
41
|
@where_params ||= {}
|
|
42
|
-
if @where_params.
|
|
42
|
+
if @where_params.key?(:id)
|
|
43
43
|
'/youtube/partner/v1/assets'
|
|
44
44
|
else
|
|
45
45
|
'/youtube/partner/v1/assetSearch'
|
|
@@ -55,4 +55,4 @@ module Yt
|
|
|
55
55
|
end
|
|
56
56
|
end
|
|
57
57
|
end
|
|
58
|
-
end
|
|
58
|
+
end
|
data/lib/yt/version.rb
CHANGED
|
@@ -279,6 +279,19 @@ describe Yt::ContentOwner, :partner do
|
|
|
279
279
|
end
|
|
280
280
|
end
|
|
281
281
|
|
|
282
|
+
describe '.assets' do
|
|
283
|
+
describe 'given the content owner has assets' do
|
|
284
|
+
let(:asset) { $content_owner.assets.first }
|
|
285
|
+
|
|
286
|
+
it 'returns valid asset' do
|
|
287
|
+
expect(asset.id).to be_a String
|
|
288
|
+
expect(asset.type).to be_a String
|
|
289
|
+
expect(asset.title).to be_a String
|
|
290
|
+
expect(asset.custom_id).to be_a String
|
|
291
|
+
end
|
|
292
|
+
end
|
|
293
|
+
end
|
|
294
|
+
|
|
282
295
|
# @note: The following test works, but YouTube API endpoint to mark
|
|
283
296
|
# an asset as 'invalid' (soft-delete) does not work, and apparently
|
|
284
297
|
# there is no way to update the status of a asset.
|
|
@@ -290,4 +303,4 @@ describe Yt::ContentOwner, :partner do
|
|
|
290
303
|
# after { @asset.delete } # This does not seem to work
|
|
291
304
|
# it { expect(@asset).to be_a Yt::Asset }
|
|
292
305
|
# end
|
|
293
|
-
end
|
|
306
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: yt
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.25.
|
|
4
|
+
version: 0.25.28
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Claudio Baccigalupo
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-04-
|
|
11
|
+
date: 2016-04-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|