Class: Fulcrum::Audio

Inherits:
MediaResource show all
Defined in:
lib/fulcrum/audio.rb

Constant Summary

Constants included from Fulcrum::Actions::List

Fulcrum::Actions::List::DEFAULT_PER_PAGE

Instance Attribute Summary

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from MediaResource

#attributes_for_upload, #create, #download, #download_version, #new_access_key, #original

Methods included from Fulcrum::Actions::Create

#create

Methods included from Fulcrum::Actions::Find

#find

Methods included from Fulcrum::Actions::List

#all, #default_list_params

Methods inherited from Resource

#attributes_for_object, #call, #collection, #initialize, #member, #member_action, #resource_name

Constructor Details

This class inherits a constructor from Fulcrum::Resource

Instance Method Details

#create_actionObject



11
12
13
# File 'lib/fulcrum/audio.rb', line 11

def create_action
  'audio/upload'
end

#default_content_typeObject



7
8
9
# File 'lib/fulcrum/audio.rb', line 7

def default_content_type
  'audio/x-m4a'
end

#medium(id, &blk) ⇒ Object



19
20
21
# File 'lib/fulcrum/audio.rb', line 19

def medium(id, &blk)
  download_version(id, 'medium', &blk)
end

#resources_nameObject



3
4
5
# File 'lib/fulcrum/audio.rb', line 3

def resources_name
  resource_name
end

#small(id, &blk) ⇒ Object



15
16
17
# File 'lib/fulcrum/audio.rb', line 15

def small(id, &blk)
  download_version(id, 'small', &blk)
end

#track(id) ⇒ Object



23
24
25
# File 'lib/fulcrum/audio.rb', line 23

def track(id)
  call(:get, member_action(id, 'track'))
end