lib/nsivideogranulate/client.rb in nsivideogranulate-0.0.2 vs lib/nsivideogranulate/client.rb in nsivideogranulate-0.2.0

- old
+ new

@@ -125,11 +125,26 @@ # @raise NSIVideoGranulate::Errors::Client::SAMConnectionError when cannot connect to the SAM node # @raise NSIVideoGranulate::Errors::Client::AuthenticationError when invalids user and/or password are provided # @raise NSIVideoGranulate::Errors::Client::KeyNotFoundError when an invalid key is provided # def grains_keys_for(video_key) - request = prepare_request :GET, {:video_key => video_key}.to_json - execute_request(request) + request = prepare_request :GET, {:video_key => video_key, :grains => true}.to_json + execute_request(request).select { |key| ['images', 'videos'].include? key } + end + + def thumbnails_keys_for(video_key) + request = prepare_request :GET, {:video_key => video_key, :grains => true}.to_json + execute_request(request).select { |key| 'thumbnails' == key } + end + + def audio_key_for(video_key) + request = prepare_request :GET, {:video_key => video_key, :grains => true}.to_json + execute_request(request).select { |key| 'audio' == key } + end + + def converted_video_key_for(video_key) + request = prepare_request :GET, {:video_key => video_key, :grains => true}.to_json + execute_request(request).select { |key| 'converted_video' == key } end # Pre-configure the NSIVideoGranulate module with default params for the NSIVideoGranulate::Client # # @yield a Configuration object (see {NSIVideoGranulate::Client::Configuration})