You can obtain the source and example programs at https://github.com/audiogum/androidsdk.
AudiogumClient
Initialise the SDK with client key and secret
public AudiogumClient(String key, String secret, String deviceId)
public AudiogumClient(String key, String secret, String deviceId, AudiogumConfiguration configuration)
key
client key issued by Audiogumsecret
client secret issued by AudiogumdeviceId
unique device identifierconfiguration
configuration options to be used in this instance (optional)Initialise the SDK with access token
public AudiogumClient(AccessToken accessToken, String deviceId)
public AudiogumClient(AccessToken accessToken, String deviceId, AudiogumConfiguration configuration)
accessToken
access token issued by Audiogum APIdeviceId
unique device identifierconfiguration
configuration options to be used in this instanceIP address lookup based upon client IP address. This product includes GeoLite2 data created by MaxMind, available from http://www.maxmind.com
Requires signin scope.
public Single<IpLookup> getIpMap()
Single
IpLookup resultGets country-specific configuration including both service configuration such as which content services are supported, and custom configuration settings for the client.
Requires signin scope.
public Single<AppConfig> getConfig()
Single
AppConfigAllows upload of arbitrary user config key/value pairs to store settings.
Requires write_userprofile scope.
public Single<Map<String, String>> updateUserConfig(Map< String, String > userConfig)
userConfig
oem-specific user configSingle<Map<String, String>>>
Map of key value configAdd or update user config by key
Requires write_userprofile scope.
public Single<Map<String, String>> updateUserConfigByKey(String key, Map<String, String> value)
key
config keyvalue
config valueSingle<Map<String, String>>
Map of key value configDelete user config by key
Requires write_userprofile scope.
public Completable deleteUserConfigByKey(String key)
key
key to deleteCompletable
resultGets previously stored key/value pairs.
Requires read_userprofile scope.
public Single<Map<String, String>> getUserConfig()
Single<String, String>
Map of key value configGet user config by key
Requires read_userprofile scope.
public Single<Map<String, String>> getUserConfigByKey(String key)
key
config keySingle <String, String>
Map of key value configAllows upload of a Base64 encoded JPG or PNG image with maximum size 800px x 800px. Once in place, an imageuri property will be added to the user account.
Requires write_userprofile scope.
public Single<UserImage> updateUserImage(UserImageimage)
image
image to addDelete user image
Requires write_userprofile scope.
public Completable deleteUserImage()
Add or update user profile image
Requires write_userprofile scope.
public Single<UserImage> updateUserProfileImage(String userProfileId, UserImage image)
image
image to adduserProfileId
User Profile IDRemove user profile image
Requires write_userprofile scope.
public Completable deleteUserProfileImage(String userProfileId)
userProfileId
User Profile IDNative client user email reset - sends a password reset email
public Completable resetUserPassword(String email)
email
email addressLogin a user and set AccessToken
public Completable loginUser(String email, String password, String scope)
email
email addresspassword
passwordscope
scopeLogin a user and set AccessToken
public Completable loginExternalUser(String externalUserId)
public Completable loginExternalUser(String externalUserId, String countryCode)
public Completable loginExternalUser(String externalUserId, String countryCode, String scope)
externalUserId
external UserIdcountryCode
country codescope
scopeCompletable
Login a mobile user and set AccessToken
public Completable loginMobileUser(String mobileNumber, String code)
public Completable loginMobileUser(String mobileNumber, String code, String scope)
mobileNumber
mobile numbercode
verification codescope
scopeCompletable
Logs the user out of the API, clearing any cached data present.
public void logoutUser()
Is a user logged in?
public Boolean isUserLoggedIn()
True if user logged in
Regiser a new user. Assumes password been confirmed on client
public Completable createUser(String email, String password)
public Completable createUser(String firstName, String lastName, String email, String password)
firstName
first namelastName
last nameemail
email addresspassword
passwordGet user account details by userid Gets the full account details.
Requires read_userprofile scope.
public Single<UserInfo> getUser()
If currentpassword or newpassword are passed both are required otherwise any non-password field can be submitted optionally. If email is included for update, this will not be updated immediately but a verification email will be sent. Once the verification link is clicked, the email will update.
Requires write_userprofile scope.
public Single<UserInfo> updateUser(UserInfo userInfo)
userInfo
user infoGet user profiles
Requires read_userprofile scope.
public Single<List<UserProfile>> getUserProfiles()
Add or updates user profile
Requires write_userprofile scope.
public Single<UserProfile> updateUserProfile(String firstname, String lastname)
firstname
first namelastname
last nameUpdate user profile details
Requires write_userprofile scope.
public Single<UserProfile> updateUserProfileById(String firstname, String lastname, String userProfileId)
firstname
first namelastname
last nameuserProfileId
User Profile IDGet user profile details
Requires read_userprofile scope.
public Single<UserProfile> getUserProfileById(String userProfileId)
userProfileId
User Profile IDDelete a user profile
Requires write_userprofile scope.
public Completable deleteUserProfileById(String userProfileId)
userProfileId
User Profile IDNative client verification - verifies a user's mobile number
public Completable verifyUserMobile(String mobileNumber, String code)
mobileNumber
mobile numbercode
verification codeNative client verification - sends a verification email
public Completable verifyUserEmail(String email)
email
email addressCheck if an account exists Check if an account exists by email address
public Completable checkUserExists(String email)
public Completable checkUserExists(String email, Boolean validate)
email
The Email address to look upvalidate
Flag to enable email address validationGet help and support content Requires signin scope.
public Single<SupportDocumentation> getSupportDocumentation(String lang)
lang
Language code to look for; falls back to enSends support email
Requires signin scope.
public Completable sendSupportEmail(SupportEmail supportEmail)
supportEmail
email to sendGets an authorize URI to start a OAuth2 flow with the content service.
Requires write_userprofile scope.
public Single<UserServiceAuthorizeDetails> startServiceAuthorization(String serviceId)
serviceId
the id of the service.Obtain or refresh a service access token
Requires write_userprofile scope.
public Single<UserServiceCredentials> obtainServiceToken(String serviceId, String code)
serviceId
the id of the service.code
Optional OAuth2 authorization code from the serviceSingle
Remove a service access token
Requires write_userprofile scope.
public Completable removeserviceToken(String serviceId)
serviceId
the id of the service.Completable
Browse service content. Returns a list of items of type category; which can be explored with the ultimate goal of drilling down to items of types such as internetradio, audiobook or playlist. To explore a category, pass it's ref to this API in the parent parameter. Some services will return nested items within the category meaning no callback is required to explore further.
Requires search scope.
public Single<SearchResultsGroup> browseService(String service)
public Single<SearchResultsGroup> browseService(String service, Long children)
public Single<SearchResultsGroup> browseService(String service, String parent)
public Single<SearchResultsGroup> browseService(String service, String parent, Long startindex)
public Single<SearchResultsGroup> browseService(String service, String parent, Long startindex, Long itemsperpage)
public Single<SearchResultsGroup> browseService(String service, String parent, Long startindex, Long itemsperpage, Long children)
service
The content serviceparent
Optional parent group for drill downstartindex
Optional paging - the offset that items should start at - defaults to 0itemsperpage
Optional paging - the number of items to return in each bucket - defaults to 20children
Optionally 'peek' into categories and include this number of child items in each category - defaults to 0 (no child item peeking), maximum 5Get an artist by id Get an artist by id. Returns artisttype, biogs, dateofbirth, dateofdeath, gender, genres, images, links, name, origin, originname, popularity, related, similar, services, tags, territory, yearsactive.
Requires search scope.
public Single<Artist> getArtist(String artistId)
artistId
Artist idGets an artist's songs from a service based on our id
Requires search scope.
public Single<TrackListing> getArtistSongs(String artistId, String service)
public Single<TrackListing> getArtistSongs(String artistId, String service, Long startindex)
public Single<TrackListing> getArtistSongs(String artistId, String service, Long startindex, Long itemsperpage)
artistId
Audiogum artist idservice
The content servicestartindex
paging - the offset that items should start at - defaults to 0itemsperpage
paging - the number of items to return - defaults to 50Get an artists songs from a service based on its ref
Requires search scope.
public Single<TrackListing> getArtistSongsByRef(String service, String ref)
public Single<TrackListing> getArtistSongsByRef(String service, String ref, Long startindex)
public Single<TrackListing> getArtistSongsByRef(String service, String ref, Long startindex, Long itemsperpage)
ref
The content service referenceservice
The content servicestartindex
paging - the offset that items should start at - defaults to 0itemsperpage
paging - the number of items to return - defaults to 50Gets an artist's albums from a service based on our id
Requires search scope.
public Single<PlaylistListing> getArtistAlbums(String artistId, String service)
public Single<PlaylistListing> getArtistAlbums(String artistId, String service, Long startindex)
public Single<PlaylistListing> getArtistAlbums(String artistId, String service, Long startindex, Long itemsperpage)
artistId
Audiogum artist idservice
The content servicestartindex
paging - the offset that items should start at - defaults to 0itemsperpage
paging - the number of items to return - defaults to 50Gets an artist's albums from a service based on its ref
Requires search scope.
public Single<PlaylistListing> getArtistAlbumsByRef(String service, String ref)
public Single<PlaylistListing> getArtistAlbumsByRef(String service, String ref, Long startindex)
public Single<PlaylistListing> getArtistAlbumsByRef(String service, String ref, Long startindex, Long itemsperpage)
ref
The content service referenceservice
The content servicestartindex
paging - the offset that items should start at - defaults to 0itemsperpage
paging - the number of items to return - defaults to 50Gets an artist's albums from a service based on its ref
Requires search scope.
public Single<SearchResultsGroup> getArtistAlbumsByRef(String service, String ref, String itemtype)
public Single<SearchResultsGroup> getArtistAlbumsByRef(String service, String ref, String itemtype, Long startindex)
public Single<SearchResultsGroup> getArtistAlbumsByRef(String service, String ref, String itemtype, Long startindex, Long itemsperpage)
ref
The content service referenceservice
The content serviceitemtype
The type of item to fetch. See ThirdPartyServiceConfig.drilldowntypes
in getAppConfig
response for valid types for each service.startindex
paging - the offset that items should start at - defaults to 0itemsperpage
paging - the number of items to return - defaults to 50Search across content services for content. Returns search results in various buckets
Requires search scope.
public Single<SearchResults> search(String text)
public Single<SearchResults> search(String text, Long itemsperpage)
public Single<SearchResults> search(String text, Long itemsperpage, List<String> type)
public Single<SearchResults> search(String text, Long itemsperpage, List<String> type, List<String> service)
text
Content queryitemsperpage
Number of items in each bucket - default 3type
Optional filter parameter that limits types searched to those that are in this comma delimited listservice
Optional filter parameter that limits the services searched to those that are in this list (assuming they are allowed for the user)Single
Get tracks for an album
Requires search scope.
public void getAlbumTracks(String service, String ref, Callback<TrackListing> callback)
service
The content serviceref
Service reference of parentGet tracks for an album
Requires search scope.
public Single<TrackListing> getAlbumTracks(String service, String ref)
public Single<TrackListing> getAlbumTracks(String service, String ref, Long startindex, Long itemsperpage)
service
The content serviceref
Service reference of parentGet tracks for a playlist
Requires search scope.
public Single<TrackListing> getPlaylistTracks(String service, String ref)
public Single<TrackListing> getPlaylistTracks(String service, String ref, Long startindex, Long itemsperpage)
service
The content serviceref
Service reference of parentstartindex
Optional paging - the offset that items should start at - defaults to 0itemsperpage
Optional paging - the number of items to return - defaults to 50Gets songs of a parent item - e.g. songs for an album, playlist. See https://www.audiogum.com/developers/docs/contentaggregation#drill_down.
Requires search scope.
public Single<TrackListing> getSongsByParent(String type, String service, String ref)
public Single<TrackListing> getSongsByParent(String type, String service, String ref, Long itemsperpage)
public Single<TrackListing> getSongsByParent(String type, String service, String ref, Long itemsperpage, Long startindex)
type
The resource typeservice
The content serviceref
The content service resource referencestartindex
Optional paging - the offset that items should start at - defaults to 0itemsperpage
Optional paging - the number of items to return - defaults to 50Gets a song by service reference.
Requires search scope.
public Single<Track> getServiceSong(final String ref, final String service)
public Single<Track> getServiceSong(final String ref, final String service, final Long itemsperpage)
public Single<Track> getServiceSong(final String ref, final String service, final Long itemsperpage, final Long startindex)
ref
The content service resource referenceservice
The content servicestartindex
Optional paging - the offset that items should start at - defaults to 0itemsperpage
Optional paging - the number of items to return - defaults to 50Gets a playlist or album by service reference.
Requires search scope.
public Single<Playlist> getServicePlaylist(final String type, final String ref, final String service)
public Single<Playlist> getServicePlaylist(final String type, final String ref, final String service, final Long itemsperpage)
public Single<Playlist> getServicePlaylist(final String type, final String ref, final String service, final Long itemsperpage, final Long startindex)
type
The resource type ("playlist" or "album")ref
The content service resource referenceservice
The content servicestartindex
Optional paging - the offset that items should start at - defaults to 0itemsperpage
Optional paging - the number of items to return - defaults to 50Search artists
Requires search scope.
public Single<SearchResultsGroup> searchArtist(String text)
public Single<SearchResultsGroup> searchArtist(String text, Long itemsperpage, Long startindex)
text
Query to search foritemsperpage
Number of items in each bucket - default 20startindex
Page start position - default 0Search artists
Requires search scope.
public Single<SearchResultsGroup> searchArtistByIds(List<String> id)
public Single<SearchResultsGroup> searchArtistByIds(List<String> id, Long itemsperpage, Long startindex)
id
IDs to obtain details foritemsperpage
Number of items in each bucket - default 20startindex
Page start position - default 0Single bucket results for paging Drill down into detailed results for paging through a bucket.
Requires search scope.
public Single<SearchResultsGroup> searchByTypeService(String type, String service, String text)
public Single<SearchResultsGroup> searchByTypeService(String type, String service, String text, Long itemsperpage, Long startindex)
type
The bucket typeservice
The content servicetext
Content queryitemsperpage
Number of items in each bucket - default 20startindex
Page start position - default 0Get a list of genres. Includes popularity in the current country and localized name.
Requires search scope.
public Single<Genres> getGenres()
public Single<Genres> getGenres(Long itemsperpage, Long startindex)
startindex
Paging - the offset that items should start atitemsperpage
Paging - the number of items to returnGet the top artists (by popularity) for a selection of given genres
Requires search scope.
public Single<TopArtistsByGenre> getTopArtistsForGenre(List<String> genre)
public Single<TopArtistsByGenre> getTopArtistsForGenre(List<String> genre, Long itemsperpage, Long startindex)
public Single<TopArtistsByGenre> getTopArtistsForGenre(List<String> genre, List<String> fields)
public Single<TopArtistsByGenre> getTopArtistsForGenre(List<String> genre, List<String> fields, Long itemsperpage, Long startindex)
genre
The genres to get topartists forstartindex
Paging - the offset that items should start atitemsperpage
Paging - the number of items to returnfields
The fields to returnThe most popular artists across a range of genres, merged together.
Requires search scope.
public Single<TopArtists> getTopArtists()
public Single<TopArtists> getTopArtists(List<String> fields, Long itemsperpage)
itemsperpage
Paging - the number of items to returnfields
The fields to returnGet details of content services currently linked to the user.
Requires read_userprofile scope.
public Single<List<Service>> getUserServices()
Get details of a single content service currently linked to the user.
Requires read_userprofile scope.
public Single<Service> getUserService(String serviceId)
serviceId
the id of the service.Request to create a playable and associate it with a device, based on specified parameters. This will update an existing playable if it exists for the same user with the same parameters.
For examples, see https://www.audiogum.com/partners/docs/playback.html
Requires write_playlists scope.
public Single<Playable> createUserPlayable(CreatePlayableRequestrequest)
request
Information required to create a user playableGet information for a playable for playback based on its id. Depending on the type of playable, this gives a list of items or a streamurl for playback, plus data for service authentication where necessary.
For examples, see https://www.audiogum.com/partners/docs/playback.html
Requires read_playlists scope.
public Single<PlayableTracks> getPlayableTracks(String id)
public Single<PlayableTracks> getPlayableTracks(String id, Boolean streamurls)
public Single<PlayableTracks> getPlayableTracks(String id, Boolean streamurls, Long startindex)
public Single<PlayableTracks> getPlayableTracks(String id, Boolean streamurls, Long startindex, Long itemsperpage)
id
playable idstreamurls
Optionally omit stream urls (false). Default (true) indicates include where applicablestartindex
Optional start index within the playlist. Omit this to use automatic continuation.itemsperpage
Optional number of items to get. Omit this to accept the default which may vary by playable type and service.Single
Deletes a specific playable based on its id
Requires write_playlists scope.
public Completable deletePlayable(String id)
id
playable idCompletable
Get the details including items of a specific playable based on its id (note: this is not for playback purposes)
Requires read_playlists scope.
public Single<PlayableTracks> getUserPlayableItems(String id, Long startindex)
public Single<PlayableTracks> getUserPlayableItems(String id, Long startindex, Long itemsperpage)
id
playable idstartindex
Optional start index within the playlist. Omit this to use automatic continuation.itemsperpage
Optional number of items to get. Omit this to accept the default which may vary by playable type and service.Single
List the playables created by the user. By default this gives results in order of most recently used.
Requires read_playlists scope.
public Single<Playables> getUserPlayables()
public Single<Playables> getUserPlayables(String type)
public Single<Playables> getUserPlayables(String type, String service)
public Single<Playables> getUserPlayables(String type, String service, String deviceId)
public Single<Playables> getUserPlayables(String type, String service, String deviceId, Long startindex)
public Single<Playables> getUserPlayables(String type, String service, String deviceId, Long startindex, Long itemsperpage)
type
Optionally filter by type of playableservice
Optionally filter by service providerdeviceId
Optionally filter by devicestartindex
Start index for paging (default 0)itemsperpage
Number of results per page (default 10)Single
Refresh streaming urls on behalf of the user for specific items from a service, for the case of time-limited content
Requires read_playlists scope.
public Single<TrackListing> refreshStreamUrls(String id, String service, List<String> trackids)
id
playable idservice
service providertrackids
track ids to refreshSingle
Get remotecontrol details of connected remote control device
See https://www.audiogum.com/developers/docs/remotecontrol.html for more details.
public Single<RemoteControlSupportedActionsDetails> getRemoteControlDetails(String remoteControlToken)
remoteControlToken
Remote control tokenGet player state from a connected remote control device
See https://www.audiogum.com/developers/docs/remotecontrol.html for more details.
public Single<DevicePlayerDetails> getRemoteControlDevicePlayerDetails(String remoteControlToken)
remoteControlToken
Remote control tokenGet device state from a connected remote control device
See https://www.audiogum.com/developers/docs/remotecontrol.html for more details.
public Single<RemoteControlDeviceDetails> getRemoteControlDeviceDetails(String remoteControlToken)
remoteControlToken
Remote control tokenGet preset state from a connected remote control device
See https://www.audiogum.com/developers/docs/remotecontrol.html for more details.
public Single<RemoteControlDevicePresetDetails> getRemoteControlDevicePresetsDetails(String remoteControlToken)
remoteControlToken
Remote control tokenAuthenticates the user, creating a 'speech' scoped token and a token valid for use in the remote control websockets API.
Call this method early in your flow if you know you will need voice capabilities, as opening the first voice session without first calling this method can be slow and lead to a poor user experience.
See https://www.audiogum.com/developers/docs/naturallanguageunderstanding for more details.
public Completable authenticateForVoice()
Starts a voice session. This allows the client to talk to the Audiogum Voice service which are APIs for controlling devices through voice commands. This method must be called before any data is sent to the voice service through sendVoiceMessage(String message) or sendVoiceMessage(byte[] message).
See https://www.audiogum.com/developers/docs/naturallanguageunderstanding for more details.
public Completable openVoiceSession(VoiceProperties voiceProperties, VoiceListener voiceListener)
voiceProperties
The voiceproperties to initiate a voice interaction.voiceListener
A listener that will receive to messages sent back from the voice service. It may also be sent again during the interaction as necessary to update nowplaying data if the player state changes.Send a string message to the voice service.
See https://www.audiogum.com/developers/docs/naturallanguageunderstanding for more details.
public void sendVoiceMessage(String message)
message
The messageSend a binary message to the voice service.
See https://www.audiogum.com/developers/docs/naturallanguageunderstanding for more details.
public void sendVoiceMessage(byte[] message)
message
The messageSends an empty (zero byte) binary message to the service to indicate that no more bytes are expected.
See https://www.audiogum.com/developers/docs/naturallanguageunderstanding for more details.
public void sendVoiceTerminator()
Closes any active voice session.
public void closeVoiceSession()
public Single<Respond> generateResponseAudio(String phraseKey, String languageCode)`
Generates an audio response for the specified phrase in the language desired.
Requires speech scope.
phraseKey
the key of the phrase to generate audio for.languageCode
the language to use when generating. If null, the user's language will be used.A response to be used for this phrase.
public Single<SpeechSuggestionResponse> getSpeechSuggestions()
public Single<SpeechSuggestionResponse> getSpeechSuggestions(SpeechSuggestionRequest request)
Get (possibly personalised) example phrases that can be used to describe how speech control works
Requires speech scope.
request
now playing data and language codeSpeech suggestions
public Single<TextToActionResponse> makeSpeechRequestWithActionText(TextToActionRequest request)
Convert the text of an instruction into the action that should be performed.
Requires speech scope.
request
speech text and language codeAction to be performed.
public Completable sendAnalyticsEvents(Event[] events, boolean validateonly)
Send user and client behaviour analytics events.
Requires write_events scope.
See https://www.audiogum.com/developers/docs/analytics for more detail.
events
The events to be recorded.validateonly
if true, events will be validated only and not processed.Completable
public Completable uploadLog(String deviceId, String logType, String logContent) throws IOException
Upload a log or crash dump file.
Requires write_device scope.
deviceId
The id of the device the log relates to.logType
The type of log to be sent.logContent
The content to be logged.Completable
public Single<TasteProfile> getTasteProfile()
Gets the user's full taste profile.
Requires read_userprofile scope.
Single
public Completable addLikesToTasteProfile(Artist[] artists)
public Completable addLikesToTasteProfile(InternetRadio[] internetRadios)
public Completable addLikesToTasteProfile(Playlist[] playlists, Playlist[] albums)
public Completable addLikesToTasteProfile(Track[] songs)
public Completable addLikesToTasteProfile(Artist[] artists, InternetRadio[] internetRadios, Playlist[] playlists, Playlist[] albums, Track[] songs)
Adds likes to a user's taste profile.
Requires write_userprofile scope.
artists
Artists to be added to the profile.internetRadio
Internet Radio stations to be added to the profile.playlists
Playlists to be added to the profile.albums
Albums to be added to the profile.songs
Songs to be added to the profileCompletable
public Completable addToTasteProfile(TasteProfile tasteProfile)
Adds Items to a user's taste profile.
Requires write_userprofile scope.
items
Items to be added to the profile.Completable
public Completable deleteLikesFromTasteProfile(Artist[] artists)
public Completable deleteLikesFromTasteProfile(InternetRadio[] internetRadios)
public Completable deleteLikesFromTasteProfile(Playlist[] playlists, Playlist[] albums)
public Completable deleteLikesFromTasteProfile(Track[] songs)
public Completable deleteLikesFromTasteProfile(Artist[] artists, InternetRadio[] internetRadio, Playlist[] playlists, Playlist[] albums, Track[] songs)
Removes likes from a user's taste profile.
Requires write_userprofile scope.
artists
Artists to be removed from the profile.internetRadio
Internet radio stations to be removed from the profile.playlists
Playlists to be removed from the profile.albums
Albums to be removed from the profile.songs
Songs to be removed from the profile.Completable
public Completable deleteFromTasteProfile(TasteProfile tasteProfile)
Removes items from a user's taste profile.
Requires write_userprofile scope.
tasteProfile
Items to be removed from the profile.Completable
public Single<TagsProfile> getTasteGenreTags()
public Single<TagsProfile> getTasteGenreTags(Integer tagsPerItem)
Gets the top genre tags in the user's profile. Each result indicates the number of liked items in the user's taste, and the percentage of liked items that match the tag.
Requires read_userprofile scope.
tagsPerItem
Optionally limit the tag values used per item to the specified number of most important valuesSingle
public Single<TasteMatch> checkArtistTasteStateByName(String name)
Check state of item in taste profile by name
Requires read_userprofile scope.
name
The name to matchSingle
public Completable addToTasteProfileByName(TasteProfile itemsToAdd)
Add items to the taste profile by name
Requires read_userprofile scope.
name
item to be addedCompletable
public Single<TagonomyResult> browseTagonomy(String id)
public Single<TagonomyResult> browseTagonomy(String id, String service)
public Single<TagonomyResult> browseTagonomy(String id, String service, Long startindex)
public Single<TagonomyResult> browseTagonomy(String id, String service, Long startindex, Long itemsperpage)
Browse artists by tag node network. For a given node returns some artists satisfying the associated tags, and related nodes to explore.
Requires search scope
id
id of tag node in browse network. Omit to see root nodes.service
Specify a 3rd party music service (required if needing to filter artists for availability)startindex
Offset that artists should start at (paging)itemsperpage
Number of artists to return (paging)TagonomyResult containing artists and related nodes.
public Single<UserContexts> getUserContexts()
Get all contexts including user configuration
UserContexts all UserContexts or configuration for unset contexts
public Single<UserContext> getUserContext(final String contextid)
Get a context including user configuration if any
contextid
context idUserContext or configuration
public Single<UserContext> updateUserContext(final String contextid, final UserContext userContext)
Sets (enables, configures) a context for the user
contextid
context iduserContext
contextUpdated UserContext
public Single<UserContext> getUserContext(Double latitude, Double longitude, Date datetime)
public Single<UserContext> getUserContext(Double latitude, Double longitude, String activity, Date datetime)
Get the current matching context if any given user's current state
latitude
Latitude of current locationlongitude
Longitude of current locationactivity
Current activitydatetime
DatetimeMatching UserContext
public Single<UserContextMatches> getContextMatches(Double latitude, Double longitude, String activity, Date datetime)
Evaluates the conditions for every enabled context to explain matching
latitude
Latitude of current locationlongitude
Longitude of current locationactivity
Current activitydatetime
DatetimeMatched, unmatched contexts and reasons for every enabled context
public Single<AppRelease> getAppRelease(@NonNull String region, @NonNull String platform, @NonNull String appstore,
@NonNull String version, String language, String altapp,
String platformversion, String devicemanufacturer, String devicename)
Fetches details of any available app update.
region
Region to check for (required)platform
Operating system (required)appstore
App Store to check (required)version
Current version installed (required)language
Get releasenotes in this languagealtapp
Codename of alternative app. Omit this for releases of the default app.platformversion
Optional operating system versiondevicemanufacturer
Optional device manufacturerdevicename
Optional device namean AppRelease describing the available update, or null if none available.
public Completable registerDevice()
Registers the device making the SDK calls with the Audiogum API. This is required to ensure your analytics data is as accurate as possible.
Completable
public Single<DeviceList> getUserDevices(String[] deviceTypes)
Lists the devices this user has been associated with.
deviceTypes
An optional array of device types to fetch.a DeviceList containing information about the devices associated to the current user.
public Single<DeviceList> getUserOwnedDevices()
Lists the devices currently owned by the current user. Note that the full device info is not shown here.
a DeviceList containing information about the user's currently owned devices.
public Completable registerUserOwnedDevice(@NonNull String deviceid)
Creates an ownership relationship betweenn the specified device and the current user. If the device already has a different owner, this request will fail with 409 response code.
deviceid
the id of the device being marked as owned.Completable