lib/vimeo_ruby/user.rb in vimeo_ruby-0.4.1 vs lib/vimeo_ruby/user.rb in vimeo_ruby-0.4.2

- old
+ new

@@ -23,13 +23,11 @@ self.class.base_uri end def uploaded_videos(query_params: {}) if @video_collection.nil? || !query_params.empty? - uploaded_videos_response = self.class.get("#{base_uri}/users/#{vimeo_id}/videos", query_params: query_params) - uploaded_videos = uploaded_videos_response["data"] - @video_collection = UploadedVideoCollection.new(uploaded_videos) + @video_collection = retrieve_video_collection(query_params) else @video_collection end end @@ -37,8 +35,16 @@ @available_for_hire end def can_work_remotely? @can_work_remotely + end + + private + + def retrieve_video_collection(query_params) + uploaded_videos_response = self.class.get("#{base_uri}/users/#{vimeo_id}/videos", query_params: query_params) + uploaded_videos = uploaded_videos_response["data"] + UploadedVideoCollection.new(uploaded_videos) end end end