Sha256: b96db5868be986961e35295c41a7596b228a34faec4ad9d8e6e9a34ef3a8a316

Contents?: true

Size: 678 Bytes

Versions: 9

Compression:

Stored size: 678 Bytes

Contents

# Sorenson Namespace
module Sorenson
  # Sorenson Services Namespace
  module Services
    # Allows you to access the resources associated with a sorenson services asset.  An asset currently refers to video content.
    class Preset < Base
      def self.all
        get_from('/presets')
      end
      
      def self.find_by_name(name)
        response = get_from("/presets/#{URI.encode(name)}")
        if response.has_key?(:errors)
          nil
        else
          response['url']
        end
      end
      
      def self.create(name, group_id, file)
        post_to("/presets", :file_name => name, :group_guid => group_id, :file => file)
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
360_services-1.1.3 lib/sorenson/services/preset.rb
360_services-1.1.2 lib/sorenson/services/preset.rb
360_services-1.1.1 lib/sorenson/services/preset.rb
360_services-1.0.10 lib/sorenson/services/preset.rb
360_services-1.1.0 lib/sorenson/services/preset.rb
360_services-1.0.9 lib/sorenson/services/preset.rb
360_services-1.0.8 lib/sorenson/services/preset.rb
360_services-1.0.7 lib/sorenson/services/preset.rb
360_services-1.0.4 lib/sorenson/services/preset.rb