Station

class Station(id: Int?)

Station metadata.

Note that a station's `id` changes whenever new music is added or removed from a station, and so it should not be expected to be constant. Arbitrary information can be attached to a station (such as a text description or BPM data or foreign keys) and made available via getOption - contact support@adaptr.com to assign those values.

Constructors

Station
Link copied to clipboard
fun Station(id: Int?)

Functions

containsOption
Link copied to clipboard
fun containsOption(key: String): Boolean

Returns true of the station has an option with the given key

equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
getOption
Link copied to clipboard
fun getOption(key: String): Any?

Arbitrary options associated with the station

hashCode
Link copied to clipboard
open override fun hashCode(): Int
hasNewMusic
Link copied to clipboard
fun hasNewMusic(): Boolean
setOfflineType
Link copied to clipboard
fun setOfflineType(flag: Boolean)
toString
Link copied to clipboard
open override fun toString(): String

Properties

audioFiles
Link copied to clipboard
@SerializedName(value = "audio_files")
var audioFiles: List<AudioFile>? = null

On demand stations will no longer contain list of audio files, you must use FeedAudioPlayer.getTracksByID() to get a list of audioFiles for that station. This object is only useful for offline stations

castUrl
Link copied to clipboard
@SerializedName(value = "cast_url")
var castUrl: String? = null

If this is a simulcast station, this would be the URL of the station

expiry
Link copied to clipboard
@SerializedName(value = "expire_date")
var expiry: Date? = null

Expiry is only available for offline stations.

id
Link copied to clipboard
@SerializedName(value = "id")
val id: Int?

Unique id for this station. Note: this ID should not be persisted between app runs, as it will change when the contents of the station change.

isOnDemand
Link copied to clipboard
@SerializedName(value = "on_demand")
val isOnDemand: Boolean = false
isTypeOffline
Link copied to clipboard
var isTypeOffline: Boolean = false

Return true if the station is offline type

lastPlayStart
Link copied to clipboard
@SerializedName(value = "last_play_start")
var lastPlayStart: Date? = null
lastUpdated
Link copied to clipboard
@SerializedName(value = "last_updated")
val lastUpdated: Date? = null
name
Link copied to clipboard
@SerializedName(value = "name")
lateinit var name: String

Name of the station

options
Link copied to clipboard
@SerializedName(value = "options")
val options: Map<String, Any>? = null
preGain
Link copied to clipboard
@SerializedName(value = "pre_gain")
var preGain: Float

Get pre-gain for this station, this is the perceived loudness.