Class: Imuze::CreateMusic

Inherits:
Struct
  • Object
show all
Defined in:
lib/imuze/create_music.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#durationObject

Returns the value of attribute duration

Returns:

  • (Object)

    the current value of duration



2
3
4
# File 'lib/imuze/create_music.rb', line 2

def duration
  @duration
end

#genreObject

Returns the value of attribute genre

Returns:

  • (Object)

    the current value of genre



2
3
4
# File 'lib/imuze/create_music.rb', line 2

def genre
  @genre
end

#optionsObject

Returns the value of attribute options

Returns:

  • (Object)

    the current value of options



2
3
4
# File 'lib/imuze/create_music.rb', line 2

def options
  @options
end

#structureObject

Returns the value of attribute structure

Returns:

  • (Object)

    the current value of structure



2
3
4
# File 'lib/imuze/create_music.rb', line 2

def structure
  @structure
end

#subgenreObject

Returns the value of attribute subgenre

Returns:

  • (Object)

    the current value of subgenre



2
3
4
# File 'lib/imuze/create_music.rb', line 2

def subgenre
  @subgenre
end

#tokenObject

Returns the value of attribute token

Returns:

  • (Object)

    the current value of token



2
3
4
# File 'lib/imuze/create_music.rb', line 2

def token
  @token
end

Class Method Details

.call(*args) ⇒ Object



7
8
9
# File 'lib/imuze/create_music.rb', line 7

def self.call(*args)
  new(*args).call
end

Instance Method Details

#callObject



11
12
13
14
# File 'lib/imuze/create_music.rb', line 11

def call
  response = http.request(put_request)
  JSON.parse(response.read_body)
end