java.lang.Object | |||
↳ | java.util.Observable | ||
↳ | fm.audiobox.core.models.Model | ||
↳ | fm.audiobox.core.models.User |
A User can interact with his own files in different ways, depending on the remote storage in play.
However AudioBox is built with homogeneity in mind and therefore you will end up calling the same methods for different, powerful actions. For the most part the returned attributes are straightforward, such as media_files_count, however there are special attributes to explain:Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | ACCEPTED_EXTENSIONS | ||||||||||
String | ACCEPTED_FORMATS | ||||||||||
String | COMET_CHANNEL | ||||||||||
String | COUNTRY | ||||||||||
String | CREATED_AT | ||||||||||
String | MEDIA_FILES_COUNT | ||||||||||
String | OFFLINE_PLAYLIST | ||||||||||
String | PLAN | ||||||||||
String | PLAYLISTS_COUNT | ||||||||||
String | REAL_NAME | ||||||||||
String | SUBSCRIPTION_STATE | ||||||||||
String | TIME_ZONE | ||||||||||
String | TOTAL_PLAY_COUNT | ||||||||||
String | UPDATED_AT |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
User() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String |
getAcceptedExtensions()
Gets accepted extensions.
| ||||||||||
String |
getAcceptedFormats()
Gets accepted formats.
| ||||||||||
String |
getAuthToken()
Gets the current authentication token for the user.
| ||||||||||
String |
getCometChannel()
Gets the unique push engine channel for this user.
| ||||||||||
String |
getCountry()
Gets country.
| ||||||||||
String |
getCreatedAt()
Gets the user creation time (in form of an UTC String).
| ||||||||||
String |
getEmail()
Gets email.
| ||||||||||
ExternalTokens |
getExternalTokens()
Gets the user's
ExternalTokens that indicates if AudioBox have stored an OAuth
token for the user. | ||||||||||
long |
getId()
Gets id.
| ||||||||||
long |
getMediaFilesCount()
Gets total media files count.
| ||||||||||
String |
getOfflinePlaylist()
Gets offline playlist token.
| ||||||||||
Permissions |
getPermissions()
Gets the hash that defines the boolean permissions the user has access to, depending on subscription state if it's
a paid feature.
| ||||||||||
String |
getPlan()
Gets the plan name the user is subscribed to, if any..
| ||||||||||
long |
getPlaylistsCount()
Gets playlists count.
| ||||||||||
Preferences |
getPreferences()
Gets the user's
Preferences
Preferences are never null | ||||||||||
String |
getRealName()
Gets real name.
| ||||||||||
Stats |
getStats()
Gets the user's
Stats | ||||||||||
String |
getSubscriptionState()
Gets the string identifying the paid subscription states for this user.
| ||||||||||
String |
getTimeZone()
Gets time zone.
| ||||||||||
long |
getTotalPlayCount()
Gets total play count.
| ||||||||||
String |
getUpdatedAt()
Gets the last time (in form of an UTC String) this account have been changed.
| ||||||||||
boolean |
savePreferences(AudioBoxClient audioBoxClient)
Saves user preferences
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
fm.audiobox.core.models.Model
| |||||||||||
From class
java.util.Observable
| |||||||||||
From class
java.lang.Object
|
Gets accepted extensions.
Gets accepted formats.
Gets the current authentication token for the user. This attribute can change and might be rotated at any time.
Gets the unique push engine channel for this user. AudioBox employ push notifications, by making the application subscribe to this channel name it will be able to receive actions to perform in the user interface.
Using push messages is a great way to keep all the applications in sync when an action is performed, such as media add. Further documentation on how to connect to the push server will be provided soon.Gets country.
Gets the user creation time (in form of an UTC String).
Gets email.
Gets the user's ExternalTokens
that indicates if AudioBox have stored an OAuth
token for the user.
Gets id.
Gets total media files count.
Gets offline playlist token.
Gets the hash that defines the boolean permissions the user has access to, depending on subscription state if it's a paid feature.
In case the User has been created through a Partner it will inherit permissions depending on the Partner requested features. Such attributes are automatically set by the system and cannot be changed manually.Permissions
Gets the plan name the user is subscribed to, if any..
Gets playlists count.
Gets the user's Preferences
Preferences are never null
Gets real name.
Gets the string identifying the paid subscription states for this user. Some features cannot be accessed if the subscription is not valid. We suggest to not use logic in your own application against this attribute, but rather query the permissions: {} data to have more fine-grained control over the available actions.
Possible values are: active, trialing, past_due, canceled and unpaid.Gets time zone.
Gets total play count.
Gets the last time (in form of an UTC String) this account have been changed.
NOTE: Since client timezone may differ significantly you are strongly invited
to always trust and use this datetime in case you are building a sync tool.
Saves user preferences
audioBoxClient | the client |
---|
AudioBoxException | if any of the remote error exception is detected. |
---|---|
IOException | if any connection problem occurs. |