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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2af780eba918c5d863f386c47a56487d155bb9bd
4
- data.tar.gz: 20fd1fafe9e5e595edb071ffda8b7f9beec74d7f
3
+ metadata.gz: b3eb896c148e353a917eb3092313b07fe930d4a2
4
+ data.tar.gz: 1fe174698eef603e55b78fe858e85cec50b9e21e
5
5
  SHA512:
6
- metadata.gz: dbd7823b446f6bba748db5988292e754ceaa8933722d6947b959c422c8edacf38d24c5719ba1610a832907defb13bbfe5e181d2efb06779f1afb5deb56ed35c4
7
- data.tar.gz: d424ff4da46cdfb44b8a23e66cd2fad2c5fa4e6c88b022459a378ff309b86bdb791e530c2e840d2c10e22ea577026a7e1850e23227431d544931addbca52ec6d
6
+ metadata.gz: aa3bc18521d1586bea0bd6cb783756f79e79d7fff7457c357010df89ff288ea54a258bf0e48bc98cb9d82f587548fa5668d4144059608c47ef31ea4708ddc9da
7
+ data.tar.gz: aaa676c788b5ae0b7bfd410e4eb12703db85e17950e00f73ca4a4383c7ed7ef73d71ea21608c0532e99d3f4f02851e4d382a1ef7883738e21bd6a95510bc83f5
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module YoutubeVideo
4
- VERSION = '0.2.2'
4
+ VERSION = '0.2.4'
5
5
  end
@@ -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.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-16 00:00:00.000000000 Z
13
+ date: 2016-11-19 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: http