Inherits from SPTJSONObjectBase : NSObject
Conforms to SPTPartialObject
SPTTrackProvider
Declared in SPTPartialTrack.h

Overview

Represents a “partial” track on the Spotify service. You can promote this to a full track object using SPTTrack.

API Model: https://developer.spotify.com/web-api/object-model/#track-object-simplified

API Docs: https://developer.spotify.com/web-api/track-endpoints/

Tasks

Properties

Response parsing methods

Properties

album

The album this track belongs to.

@property (nonatomic, readonly, strong) SPTPartialAlbum *album

Declared In

SPTPartialTrack.h

artists

The artists of the track, as SPTPartialArtist objects.

@property (nonatomic, readonly, copy) NSArray *artists

Declared In

SPTPartialTrack.h

availableTerritories

An array of ISO 3166 country codes in which the album is available.

@property (nonatomic, readonly, copy) NSArray *availableTerritories

Declared In

SPTPartialTrack.h

discNumber

The disc number of the track. I.e., if it’s the first disc on the album this will be 1.

@property (nonatomic, readonly) NSInteger discNumber

Declared In

SPTPartialTrack.h

duration

The duration of the track.

@property (nonatomic, readonly) NSTimeInterval duration

Declared In

SPTPartialTrack.h

flaggedExplicit

Returns YES if the track is flagged as explicit, otherwise NO.

@property (nonatomic, readonly) BOOL flaggedExplicit

Declared In

SPTPartialTrack.h

hasPlayable

Returns YES if the track has a playable status, only available if market passed to the api call.

@property (nonatomic, readonly) BOOL hasPlayable

Declared In

SPTPartialTrack.h

identifier

The id of the track.

@property (nonatomic, readonly, copy) NSString *identifier

Declared In

SPTPartialTrack.h

isPlayable

Returns YES if the track is flagged as playable, otherwise NO, if no market is passed to the api call, this will default to YES.

@property (nonatomic, readonly) BOOL isPlayable

Declared In

SPTPartialTrack.h

name

The name of the track.

@property (nonatomic, readonly, copy) NSString *name

Declared In

SPTPartialTrack.h

playableUri

A playable Spotify URI for this track.

@property (nonatomic, readonly, copy) NSURL *playableUri

Declared In

SPTPartialTrack.h

previewURL

The HTTP URL of a 30-second preview MP3 of the track.

@property (nonatomic, readonly, copy) NSURL *previewURL

Declared In

SPTPartialTrack.h

sharingURL

The HTTP open.spotify.com URL of the track.

@property (nonatomic, readonly, copy) NSURL *sharingURL

Declared In

SPTPartialTrack.h

trackNumber

The track number of the track. I.e., if it’s the first track on the album this will be 1.

@property (nonatomic, readonly) NSInteger trackNumber

Declared In

SPTPartialTrack.h

Class Methods

partialTrackFromDecodedJSON:error:

Convert a parsed HTTP response into an SPTPartialTrack object

+ (instancetype)partialTrackFromDecodedJSON:(id)decodedObject error:(NSError **)error

Parameters

decodedObject

The decoded JSON object structure.

error

An optional pointer to an NSError that will receive the error code if operation failed.

Declared In

SPTPartialTrack.h