SPTAppRemoteContentAPI Protocol Reference
Conforms to | NSObject |
---|---|
Declared in | SPTAppRemoteContentAPI.h |
– fetchRootContentItemsForType:callback:
required method
Fetches the root level of content items for the current user.
- (void)fetchRootContentItemsForType:(SPTAppRemoteContentType)contentType callback:(nullable SPTAppRemoteCallback)callback
Parameters
contentType |
A type that is used to retrieve content for a specific use-case. |
---|---|
callback |
The callback to be called once the request is completed. |
Discussion
Note: The content returned is based on the users' home feeds, and as such may vary between different users.
Declared In
SPTAppRemoteContentAPI.h
– fetchChildrenOfContentItem:callback:
required method
Fetches the children items for the provided content item.
- (void)fetchChildrenOfContentItem:(id<SPTAppRemoteContentItem>)contentItem callback:(nullable SPTAppRemoteCallback)callback
Parameters
contentItem |
The content item to fetch the children for. |
---|---|
callback |
The callback to be called once the request is completed. |
Discussion
Note: The isContainer
property of the SPTAppRemoteContentItem
indicates whether or not the item has any children.
Declared In
SPTAppRemoteContentAPI.h
– fetchRecommendedContentItemsForType:flattenContainers:callback:
required method
Fetches a list of recommended playlists for the current user.
- (void)fetchRecommendedContentItemsForType:(SPTAppRemoteContentType)contentType flattenContainers:(BOOL)flattenContainers callback:(nullable SPTAppRemoteCallback)callback
Parameters
contentType |
A type that is used to retrieve content for a specific use-case. |
---|---|
flattenContainers |
Whether or not the recommendations should be flattened into a single list or remain separated in containers. |
callback |
The callback to be called once the request is completed. |
Discussion
Note: The playlists returned are a mix of the user’s recently played feed as well as personal recommendations, and as such may vary between users.
Note: This method is only supported by Spotify clients running version 8.4.75 and above
and will fail with an SPTAppRemoteWAMPClientNotSupportedError
otherwise.
Declared In
SPTAppRemoteContentAPI.h