Class: Spotted::Models::Playlists::TrackAddParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/spotted/models/playlists/track_add_params.rb

Overview

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(body_position: nil, body_uris: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see Spotted::Models::Playlists::TrackAddParams for more details.

Parameters:

  • body_position (Integer) (defaults to: nil)

    The position to insert the items, a zero-based index. For example, to insert the

  • body_uris (Array<String>) (defaults to: nil)

    A JSON array of the [Spotify URIs](/documentation/web-api/concepts/spotify-uris-

  • request_options (Spotted::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/spotted/models/playlists/track_add_params.rb', line 33

Instance Attribute Details

#body_positionInteger?

The position to insert the items, a zero-based index. For example, to insert the items in the first position: ‘position=0` ; to insert the items in the third position: `position=2`. If omitted, the items will be appended to the playlist. Items are added in the order they appear in the uris array. For example: `[“spotify:track:4iV5W9uYEdYUVa79Axb7Rh”,“spotify:track:1301WleyT98MSxVHPZCA6M”], “position”: 3`

Returns:

  • (Integer, nil)


19
# File 'lib/spotted/models/playlists/track_add_params.rb', line 19

optional :body_position, Integer, api_name: :position

#body_urisArray<String>?

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

Returns:

  • (Array<String>, nil)


31
# File 'lib/spotted/models/playlists/track_add_params.rb', line 31

optional :body_uris, Spotted::Internal::Type::ArrayOf[String], api_name: :uris