vimeo_ruby 0.4.1 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -1
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/vimeo_ruby/user.rb +9 -3
- data/lib/vimeo_ruby/version.rb +1 -1
- data/lib/vimeo_ruby/video.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a99a2346ec3f62bc8c104769e171025a5c744992d1f9ac09ca8c8696a6e1dba3
|
4
|
+
data.tar.gz: d9c4d614bfb12698dacf100ca9ebbde0318e1eac5a92719dcb450c3597d3f24e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6df1d4ca9d9d0bea05628c3d4be4fd25ce8ccf7bba3bd7be566a372461f506a019cea0455b12455b0190f4d2e10b5ca084a9bda958e30c8c933d99dc32f50a65
|
7
|
+
data.tar.gz: 5c0cbda6008162978962026566f2a0b1ab281488d54078a9aa2fd5b4135f56ff625e23374fa819eb5daa81fa1d1916bab869f7b4386d53039033ca2bfcb420dc
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.4.3] - 2022-12-29
|
4
|
+
|
5
|
+
- Inject `VimeoRuby::User` class in `VimeoRuby::Video::new` as default arg.
|
6
|
+
|
7
|
+
## [0.4.2] - 2022-12-29
|
8
|
+
|
9
|
+
- Refactor `VimeoRuby::User#uploaded_videos` method.
|
10
|
+
|
11
|
+
## [0.4.1] - 2022-12-29
|
12
|
+
|
13
|
+
- Fix erroneous minor version release (yanked 0.4.0).
|
14
|
+
|
3
15
|
## [0.4.0] - 2022-12-29
|
4
16
|
|
5
17
|
- Save unnecessary call to get a users uploaded video collection if we already have it and no additional query params are passed in to `VimeoRuby::User#uploaded_videos`.
|
@@ -14,4 +26,4 @@
|
|
14
26
|
|
15
27
|
## [0.1.0] - 2022-12-25
|
16
28
|
|
17
|
-
- Initial release
|
29
|
+
- Initial release.
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
data/lib/vimeo_ruby/user.rb
CHANGED
@@ -25,9 +25,7 @@ module VimeoRuby
|
|
25
25
|
|
26
26
|
def uploaded_videos(query_params: {})
|
27
27
|
if @video_collection.nil? || !query_params.empty?
|
28
|
-
|
29
|
-
uploaded_videos = uploaded_videos_response["data"]
|
30
|
-
@video_collection = UploadedVideoCollection.new(uploaded_videos)
|
28
|
+
@video_collection = retrieve_video_collection(query_params)
|
31
29
|
else
|
32
30
|
@video_collection
|
33
31
|
end
|
@@ -40,5 +38,13 @@ module VimeoRuby
|
|
40
38
|
def can_work_remotely?
|
41
39
|
@can_work_remotely
|
42
40
|
end
|
41
|
+
|
42
|
+
private
|
43
|
+
|
44
|
+
def retrieve_video_collection(query_params)
|
45
|
+
uploaded_videos_response = self.class.get("#{base_uri}/users/#{vimeo_id}/videos", query_params: query_params)
|
46
|
+
uploaded_videos = uploaded_videos_response["data"]
|
47
|
+
UploadedVideoCollection.new(uploaded_videos)
|
48
|
+
end
|
43
49
|
end
|
44
50
|
end
|
data/lib/vimeo_ruby/version.rb
CHANGED
data/lib/vimeo_ruby/video.rb
CHANGED
@@ -2,7 +2,7 @@ module VimeoRuby
|
|
2
2
|
class Video < Base
|
3
3
|
attr_reader :vimeo_id, :description, :duration, :embed_html, :link, :name, :player_embed_url, :type, :user, :additional_info
|
4
4
|
|
5
|
-
def initialize(attrs: {})
|
5
|
+
def initialize(attrs: {}, user_class: VimeoRuby::User)
|
6
6
|
@vimeo_id = extract_vimeo_id_from_uri(attrs.delete("uri"))
|
7
7
|
@description = attrs.delete("description")
|
8
8
|
@duration = attrs.delete("duration")
|
@@ -11,7 +11,7 @@ module VimeoRuby
|
|
11
11
|
@name = attrs.delete("name")
|
12
12
|
@player_embed_url = attrs.delete("player_embed_url")
|
13
13
|
@type = attrs.delete("type")
|
14
|
-
@user =
|
14
|
+
@user = user_class.new(attrs: attrs.delete("user"))
|
15
15
|
@additional_info = OpenStruct.new(attrs)
|
16
16
|
end
|
17
17
|
|