YPBT 0.2.2 → 0.2.4
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/lib/YPBT/time_tag.rb +2 -1
- data/lib/YPBT/version.rb +1 -1
- data/lib/YPBT/video.rb +2 -2
- 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: b3eb896c148e353a917eb3092313b07fe930d4a2
|
4
|
+
data.tar.gz: 1fe174698eef603e55b78fe858e85cec50b9e21e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa3bc18521d1586bea0bd6cb783756f79e79d7fff7457c357010df89ff288ea54a258bf0e48bc98cb9d82f587548fa5668d4144059608c47ef31ea4708ddc9da
|
7
|
+
data.tar.gz: aaa676c788b5ae0b7bfd410e4eb12703db85e17950e00f73ca4a4383c7ed7ef73d71ea21608c0532e99d3f4f02851e4d382a1ef7883738e21bd6a95510bc83f5
|
data/lib/YPBT/time_tag.rb
CHANGED
@@ -4,7 +4,8 @@ module YoutubeVideo
|
|
4
4
|
TAG_TYPES = { MUSIC: 'music', VIDEO: 'video' }.freeze
|
5
5
|
# comment's time tag infomation
|
6
6
|
class Timetag
|
7
|
-
attr_reader :start_time, :end_time, :tag_type, :duration, :comment
|
7
|
+
attr_reader :start_time, :end_time, :tag_type, :duration, :comment,
|
8
|
+
:like_count
|
8
9
|
def initialize(start_time:, comment:, end_time: nil, like_count: nil,
|
9
10
|
tag_type: nil)
|
10
11
|
@start_time = string_to_time start_time
|
data/lib/YPBT/version.rb
CHANGED
data/lib/YPBT/video.rb
CHANGED
@@ -6,7 +6,7 @@ module YoutubeVideo
|
|
6
6
|
# Main class to setup a Video
|
7
7
|
class Video
|
8
8
|
attr_reader :title, :description, :dislike_count, :like_count,
|
9
|
-
:comment_count, :view_count
|
9
|
+
:comment_count, :view_count, :duration, :id
|
10
10
|
|
11
11
|
def initialize(data:)
|
12
12
|
@id = data['id']
|
@@ -32,7 +32,7 @@ module YoutubeVideo
|
|
32
32
|
|
33
33
|
def self.find(video_id:)
|
34
34
|
video_data = YtApi.video_info(video_id)
|
35
|
-
new(data: video_data)
|
35
|
+
new(data: video_data) if video_data
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: YPBT
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yi-Min
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-11-
|
13
|
+
date: 2016-11-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: http
|