yt 0.10.4 → 0.10.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/yt/actions/patch.rb +19 -0
- data/lib/yt/models/base.rb +2 -0
- data/lib/yt/models/match_policy.rb +4 -5
- data/lib/yt/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b514aef834131736bd47325d004cd67c38f3fcaa
|
4
|
+
data.tar.gz: 1939130b4afa95148532b4f04aa97d0e09c87ef4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ec9dbfb86d648c0b76ccc70f62bc203a76bc38ac5496c8aaaf032b00e7620e61c50d710463e9997ca3a0b13c2d414bfb05f40ae51547e86ea5929c8257c3850
|
7
|
+
data.tar.gz: 88f5254c83f8c689568d8dca5b6acb21711b68cc9812b7e9631e45f8a58709694ecc3c392146de63d743e0fcc9b906fc705a76be8f25fdff50e7a2357169ba86
|
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.10.5 - 2014-08-17
|
10
|
+
|
11
|
+
* [ENHANCEMENT] Use PATCH rather than PUT to partially update a MatchPolicy
|
12
|
+
|
9
13
|
## 0.10.4 - 2014-08-15
|
10
14
|
|
11
15
|
* [BUGFIX] List tags of videos retrieved with channel.videos and account.videos
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -41,7 +41,7 @@ To install on your system, run
|
|
41
41
|
|
42
42
|
To use inside a bundled Ruby project, add this line to the Gemfile:
|
43
43
|
|
44
|
-
gem 'yt', '~> 0.10.
|
44
|
+
gem 'yt', '~> 0.10.5'
|
45
45
|
|
46
46
|
Since the gem follows [Semantic Versioning](http://semver.org),
|
47
47
|
indicating the full version in your Gemfile (~> *major*.*minor*.*patch*)
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'yt/actions/modify'
|
2
|
+
|
3
|
+
module Yt
|
4
|
+
module Actions
|
5
|
+
module Patch
|
6
|
+
include Modify
|
7
|
+
|
8
|
+
private
|
9
|
+
|
10
|
+
def do_patch(extra_patch_params = {}, &block)
|
11
|
+
do_modify patch_params.deep_merge(extra_patch_params), &block
|
12
|
+
end
|
13
|
+
|
14
|
+
def patch_params
|
15
|
+
modify_params.tap{|params| params[:method] = :patch}
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/yt/models/base.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'yt/actions/delete'
|
2
2
|
require 'yt/actions/update'
|
3
|
+
require 'yt/actions/patch'
|
3
4
|
|
4
5
|
require 'yt/associations/has_authentication'
|
5
6
|
require 'yt/associations/has_many'
|
@@ -14,6 +15,7 @@ module Yt
|
|
14
15
|
class Base
|
15
16
|
include Actions::Delete
|
16
17
|
include Actions::Update
|
18
|
+
include Actions::Patch
|
17
19
|
|
18
20
|
extend Associations::HasReports
|
19
21
|
extend Associations::HasViewerPercentages
|
@@ -11,19 +11,18 @@ module Yt
|
|
11
11
|
@auth = options[:auth]
|
12
12
|
end
|
13
13
|
|
14
|
-
# @note Only policyId can be currently updated, not rules.
|
15
14
|
def update(attributes = {})
|
16
15
|
underscore_keys! attributes
|
17
|
-
|
16
|
+
do_patch body: {policyId: attributes[:policy_id]}
|
18
17
|
true
|
19
18
|
end
|
20
19
|
|
21
20
|
private
|
22
21
|
|
23
|
-
# @return [Hash] the parameters to submit to YouTube to
|
22
|
+
# @return [Hash] the parameters to submit to YouTube to patch an asset
|
24
23
|
# match policy.
|
25
|
-
# @see https://developers.google.com/youtube/partner/docs/v1/assetMatchPolicy/
|
26
|
-
def
|
24
|
+
# @see https://developers.google.com/youtube/partner/docs/v1/assetMatchPolicy/patch
|
25
|
+
def patch_params
|
27
26
|
super.tap do |params|
|
28
27
|
params[:path] = "/youtube/partner/v1/assets/#{@asset_id}/matchPolicy"
|
29
28
|
params[:params] = {onBehalfOfContentOwner: @auth.owner_name}
|
data/lib/yt/version.rb
CHANGED
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.10.
|
4
|
+
version: 0.10.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Claudio Baccigalupo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -122,6 +122,7 @@ files:
|
|
122
122
|
- lib/yt/actions/insert.rb
|
123
123
|
- lib/yt/actions/list.rb
|
124
124
|
- lib/yt/actions/modify.rb
|
125
|
+
- lib/yt/actions/patch.rb
|
125
126
|
- lib/yt/actions/update.rb
|
126
127
|
- lib/yt/associations/has_authentication.rb
|
127
128
|
- lib/yt/associations/has_many.rb
|