Sha256: 0dcd930fe06a669dc2a0ad001e13d558efb75472bc17f2a106adee81d948a4c9
Contents?: true
Size: 585 Bytes
Versions: 3
Compression:
Stored size: 585 Bytes
Contents
# frozen_string_literal: true module AppleMusic class Song < Resource # https://developer.apple.com/documentation/applemusicapi/song/relationships class Relationships attr_reader :albums, :artists, :genres, :station def initialize(props = {}) @albums = Relationship.new(props['albums']).data @artists = Relationship.new(props['artists']).data @genres = Relationship.new(props['genres']).data @station = Relationship.new(props['station']).data.first end end self.relationships_model = self::Relationships end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
apple_music-0.3.1 | lib/apple_music/song/relationships.rb |
apple_music-0.3.0 | lib/apple_music/song/relationships.rb |
apple_music-0.2.0 | lib/apple_music/song/relationships.rb |