Class: SpotifyWebApi::MeEpisodesRequest

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

Overview

MeEpisodesRequest 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 = nil) ⇒ MeEpisodesRequest

Returns a new instance of MeEpisodesRequest.



37
38
39
# File 'lib/spotify_web_api/models/me_episodes_request.rb', line 37

def initialize(ids = nil)
  @ids = ids
end

Instance Attribute Details

#idsArray[String]

A JSON array of the [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). <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])


18
19
20
# File 'lib/spotify_web_api/models/me_episodes_request.rb', line 18

def ids
  @ids
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



42
43
44
45
46
47
48
49
50
# File 'lib/spotify_web_api/models/me_episodes_request.rb', line 42

def self.from_hash(hash)
  return nil unless hash

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

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

.namesObject

A mapping from model property names to API property names.



21
22
23
24
25
# File 'lib/spotify_web_api/models/me_episodes_request.rb', line 21

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

.nullablesObject

An array for nullable fields



33
34
35
# File 'lib/spotify_web_api/models/me_episodes_request.rb', line 33

def self.nullables
  []
end

.optionalsObject

An array for optional fields



28
29
30
# File 'lib/spotify_web_api/models/me_episodes_request.rb', line 28

def self.optionals
  []
end