public class

MediaFiles

extends Model
java.lang.Object
   ↳ java.util.Observable
     ↳ fm.audiobox.core.models.Model
       ↳ fm.audiobox.core.models.MediaFiles

Class Overview

Used to get a list of all media files in a specific user's playlist.

Summary

Nested Classes
class MediaFiles.MediaCollectionCustomParser The Media collection custom parser. 
Constants
String JSON_TOKEN The JSON token of the objects collection.
String PARAM_SET The constant PARAM_SET.
String PARAM_SINCE The constant PARAM_SINCE.
String PARAM_TOKENS The constant PARAM_TOKENS.
Fields
protected EventedModelList<MediaFile> media_files The parsed media files list
Public Constructors
MediaFiles()
Public Methods
static boolean destroyAll(AudioBoxClient audioBoxClient, List<String> tokens)
Destroy all media files identified by the tokens in the list.
EventedModelList<MediaFile> getMediaFiles()
Gets playlists.
static Collection<Object> newList(Object context)
This method is not intended to be used directly, it exists for parsing technical reason.
[Expand]
Inherited Methods
From class fm.audiobox.core.models.Model
From class java.util.Observable
From class java.lang.Object

Constants

public static final String JSON_TOKEN

The JSON token of the objects collection.

Constant Value: "media_files"

public static final String PARAM_SET

The constant PARAM_SET.

Constant Value: "set"

public static final String PARAM_SINCE

The constant PARAM_SINCE.

Constant Value: "since"

public static final String PARAM_TOKENS

The constant PARAM_TOKENS.

Constant Value: "tokens[]"

Fields

protected EventedModelList<MediaFile> media_files

The parsed media files list

Public Constructors

public MediaFiles ()

Public Methods

public static boolean destroyAll (AudioBoxClient audioBoxClient, List<String> tokens)

Destroy all media files identified by the tokens in the list.

NOTE: this action is irreversible.

Parameters
audioBoxClient the client
tokens the tokens
Returns
  • the boolean
Throws
AudioBoxException if any of the remote error exception is detected.
IOException

public EventedModelList<MediaFile> getMediaFiles ()

Gets playlists.

Returns
  • the playlists collection.

public static Collection<Object> newList (Object context)

This method is not intended to be used directly, it exists for parsing technical reason.

It builds a new EventedModelList that is used by the parser and assigned to the underlying list of the instance of this very class.

...yes, black magic happens! :P

Parameters
context the observable parent object (typically a Playlist).
Returns
  • the collection