Class: SpotifyWebApi::MeFollowingRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- SpotifyWebApi::MeFollowingRequest
- Defined in:
- lib/spotify_web_api/models/me_following_request.rb
Overview
MeFollowingRequest Model.
Instance Attribute Summary collapse
-
#ids ⇒ Array[String]
A JSON array of the artist or user [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids).
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(ids = nil) ⇒ MeFollowingRequest
constructor
A new instance of MeFollowingRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(ids = nil) ⇒ MeFollowingRequest
Returns a new instance of MeFollowingRequest.
38 39 40 |
# File 'lib/spotify_web_api/models/me_following_request.rb', line 38 def initialize(ids = nil) @ids = ids end |
Instance Attribute Details
#ids ⇒ Array[String]
A JSON array of the artist or user [Spotify IDs](/documentation/web-api/concepts/spotify-uris-ids). For example: ‘“08td7MxkoHQkXnWAYD8d6Q”]`. A maximum of 50 IDs can be sent in one request. _Note: if the `ids` parameter is present in the query string, any IDs listed here in the body will be ignored._
19 20 21 |
# File 'lib/spotify_web_api/models/me_following_request.rb', line 19 def ids @ids end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
43 44 45 46 47 48 49 50 51 |
# File 'lib/spotify_web_api/models/me_following_request.rb', line 43 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. MeFollowingRequest.new(ids) end |
.names ⇒ Object
A mapping from model property names to API property names.
22 23 24 25 26 |
# File 'lib/spotify_web_api/models/me_following_request.rb', line 22 def self.names @_hash = {} if @_hash.nil? @_hash['ids'] = 'ids' @_hash end |
.nullables ⇒ Object
An array for nullable fields
34 35 36 |
# File 'lib/spotify_web_api/models/me_following_request.rb', line 34 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
29 30 31 |
# File 'lib/spotify_web_api/models/me_following_request.rb', line 29 def self.optionals [] end |