Class: SpotifyWebApi::ReasonEnum

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

Overview

The reason for the restriction. Albums may be restricted if the content is not available in a given market, to the user’s subscription type, or when the user’s account is set to not play explicit content. Additional reasons may be added in the future.

Constant Summary collapse

REASON_ENUM =
[
  # TODO: Write general description for MARKET
  MARKET = 'market'.freeze,

  # TODO: Write general description for PRODUCT
  PRODUCT = 'product'.freeze,

  # TODO: Write general description for EXPLICIT
  EXPLICIT = 'explicit'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.validate(value) ⇒ Object



23
24
25
26
27
# File 'lib/spotify_web_api/models/reason_enum.rb', line 23

def self.validate(value)
  return false if value.nil?

  REASON_ENUM.include?(value)
end