SPTPartialTrack Class Reference
| 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
-
identifierproperty -
nameproperty -
playableUriproperty -
sharingURLproperty -
durationproperty -
artistsproperty -
discNumberproperty -
flaggedExplicitproperty -
isPlayableproperty -
hasPlayableproperty -
availableTerritoriesproperty -
previewURLproperty -
trackNumberproperty -
albumproperty
Response parsing methods
Properties
album
The album this track belongs to.
@property (nonatomic, readonly, strong) SPTPartialAlbum *albumDeclared In
SPTPartialTrack.hartists
The artists of the track, as SPTPartialArtist objects.
@property (nonatomic, readonly, copy) NSArray *artistsDeclared In
SPTPartialTrack.havailableTerritories
An array of ISO 3166 country codes in which the album is available.
@property (nonatomic, readonly, copy) NSArray *availableTerritoriesDeclared In
SPTPartialTrack.hdiscNumber
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 discNumberDeclared In
SPTPartialTrack.hduration
The duration of the track.
@property (nonatomic, readonly) NSTimeInterval durationDeclared In
SPTPartialTrack.hflaggedExplicit
Returns YES if the track is flagged as explicit, otherwise NO.
@property (nonatomic, readonly) BOOL flaggedExplicitDeclared In
SPTPartialTrack.hhasPlayable
Returns YES if the track has a playable status, only available if market passed to the api call.
@property (nonatomic, readonly) BOOL hasPlayableDeclared In
SPTPartialTrack.hidentifier
The id of the track.
@property (nonatomic, readonly, copy) NSString *identifierDeclared In
SPTPartialTrack.hisPlayable
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 isPlayableDeclared In
SPTPartialTrack.hname
The name of the track.
@property (nonatomic, readonly, copy) NSString *nameDeclared In
SPTPartialTrack.hplayableUri
A playable Spotify URI for this track.
@property (nonatomic, readonly, copy) NSURL *playableUriDeclared In
SPTPartialTrack.hpreviewURL
The HTTP URL of a 30-second preview MP3 of the track.
@property (nonatomic, readonly, copy) NSURL *previewURLDeclared In
SPTPartialTrack.hsharingURL
The HTTP open.spotify.com URL of the track.
@property (nonatomic, readonly, copy) NSURL *sharingURLDeclared In
SPTPartialTrack.htrackNumber
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 trackNumberDeclared In
SPTPartialTrack.hClass Methods
partialTrackFromDecodedJSON:error:
Convert a parsed HTTP response into an SPTPartialTrack object
+ (instancetype)partialTrackFromDecodedJSON:(id)decodedObject error:(NSError **)errorParameters
- decodedObject
The decoded JSON object structure.
- error
An optional pointer to an
NSErrorthat will receive the error code if operation failed.
Declared In
SPTPartialTrack.h