class Ari::Sound

Attributes

formats[R]
id[R]
text[R]

Public Class Methods

get(options = {}) click to toggle source

GET /sounds/%{soundId}

Individual sound

Parameters:

soundId (required) - Sound’s id

# File lib/ari/resources/sound.rb, line 47
def self.get(options = {})
  raise ArgumentError.new("Parameter soundId must be passed in options hash.") unless options[:soundId]
  path = '/sounds/%{soundId}' % options
  response = client(options).get(path, options)
  Sound.new(response.merge(client: options[:client]))
end
list(options = {}) click to toggle source

GET /sounds

Sounds

Parameters:

lang - Lookup sound for a specific language. format - Lookup sound in a specific format.

# File lib/ari/resources/sound.rb, line 32
def self.list(options = {})
  path = '/sounds'
  response = client(options).get(path, options)
  response.map { |hash| Sound.new(hash.merge(client: options[:client])) }
end

Public Instance Methods

formats=(val) click to toggle source
# File lib/ari/resources/sound.rb, line 17
def formats=(val)
  @formats ||= val.map { |v| FormatLangPair.new(v) }
end
get(options = {}) click to toggle source
# File lib/ari/resources/sound.rb, line 54
def get(options = {})
  self.class.get(options.merge(soundId: self.id, client: @client))
end