Class: SpotifyWebApi::MeTracksRequest1

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/spotify_web_api/models/me_tracks_request1.rb

Overview

MeTracksRequest1 Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(ids = SKIP) ⇒ MeTracksRequest1

Returns a new instance of MeTracksRequest1.



40
41
42
# File 'lib/spotify_web_api/models/me_tracks_request1.rb', line 40

def initialize(ids = SKIP)
  @ids = ids unless ids == SKIP
end

Instance Attribute Details

#idsArray[String]

A JSON array of the [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example: ‘[“4iV5W9uYEdYUVa79Axb7Rh”, “1301WleyT98MSxVHPZCA6M”]`<br/>A maximum of 50 items can be specified in one request. _Note: if the `ids` parameter is present in the query string, any IDs listed here in the body will be ignored._

Returns:

  • (Array[String])


19
20
21
# File 'lib/spotify_web_api/models/me_tracks_request1.rb', line 19

def ids
  @ids
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



45
46
47
48
49
50
51
52
53
# File 'lib/spotify_web_api/models/me_tracks_request1.rb', line 45

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  ids = hash.key?('ids') ? hash['ids'] : SKIP

  # Create object from extracted values.
  MeTracksRequest1.new(ids)
end

.namesObject

A mapping from model property names to API property names.



22
23
24
25
26
# File 'lib/spotify_web_api/models/me_tracks_request1.rb', line 22

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['ids'] = 'ids'
  @_hash
end

.nullablesObject

An array for nullable fields



36
37
38
# File 'lib/spotify_web_api/models/me_tracks_request1.rb', line 36

def self.nullables
  []
end

.optionalsObject

An array for optional fields



29
30
31
32
33
# File 'lib/spotify_web_api/models/me_tracks_request1.rb', line 29

def self.optionals
  %w[
    ids
  ]
end