Home Reference Source Repository
import Collection from 'spotify-sdk/src/helpers/Collection.js'
public class | source

Collection

You can directly use instance of this class. collection

Extends:

src/entities/CollectionEntity~CollectionEntity → Collection

Add helpers methods to CollectionEntity

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get

Get the next page of the Collection

public get

Get the prev page of the Collection

Method Summary

Public Methods
public

Get the first Entity of the Collection

public

index(id: *): Object

Get a Entity based of a index

public

Get the last Entity of the Collection

Public Constructors

public constructor(data: Object) source

Params:

NameTypeAttributeDescription
data Object

Collection object

Public Members

public get next: Promise: * source

Get the next page of the Collection

Return:

Promise

public get previous: Promise: * source

Get the prev page of the Collection

Return:

Promise

Public Methods

public first(): Object source

Get the first Entity of the Collection

Return:

Object

Entity

public index(id: *): Object source

Get a Entity based of a index

Params:

NameTypeAttributeDescription
id *

Return:

Object

Entity

public last(): Object source

Get the last Entity of the Collection

Return:

Object

Entity