C# Class mobSocial.Services.ArtistPages.ArtistPageApiService

Inheritance: IArtistPageApiService
ファイルを表示 Open project: mobsoftware/mobsocial

Public Methods

Method Description
ArtistPageApiService ( ThirdPartySettings thirdPartySettings, ICacheProvider cacheProvider ) : System.Collections.Generic
DoesRemoteArtistExist ( string name ) : bool
GetArtistSongs ( string artistName, int count = 15, int page = 1 ) : IList
GetRelatedArtists ( string remoteEntityId, int count = 5 ) : IList

Gets related artists based on current artists

GetRemoteArtist ( string name ) : string

Returns remote artist as JSON string

GetRemoteSong ( string remoteEntityId ) : string
GetSimilarSongs ( string trackId, int count = 5 ) : IList
SearchArtists ( string term, int count = 15, int page = 1 ) : IList
SearchSongs ( string term, string artist = "", int count = 15, int page = 1 ) : IList

Private Methods

Method Description
GetApiUrl ( string endPoint, string parameterString = "" ) : string

Returns the API url.

ParseEchonestArtist ( JToken artist ) : string

Parses echonest json artist data to a generic artist json data. Can have different implementation for a different API

ParseEchonestTrack ( JToken track, JToken song ) : string

Parses echonest json track data to a generic track json data. Can have different implementation for a different API

Method Details

ArtistPageApiService() public method

public ArtistPageApiService ( ThirdPartySettings thirdPartySettings, ICacheProvider cacheProvider ) : System.Collections.Generic
thirdPartySettings mobSocial.Data.Entity.Settings.ThirdPartySettings
cacheProvider ICacheProvider
return System.Collections.Generic

DoesRemoteArtistExist() public method

public DoesRemoteArtistExist ( string name ) : bool
name string
return bool

GetArtistSongs() public method

public GetArtistSongs ( string artistName, int count = 15, int page = 1 ) : IList
artistName string
count int
page int
return IList

GetRelatedArtists() public method

Gets related artists based on current artists
public GetRelatedArtists ( string remoteEntityId, int count = 5 ) : IList
remoteEntityId string The entity id of artist on remote server. We store it in Artist.RemoteEntityId
count int Maximum number of results to be returned
return IList

GetRemoteArtist() public method

Returns remote artist as JSON string
public GetRemoteArtist ( string name ) : string
name string The name of artist
return string

GetRemoteSong() public method

public GetRemoteSong ( string remoteEntityId ) : string
remoteEntityId string
return string

GetSimilarSongs() public method

public GetSimilarSongs ( string trackId, int count = 5 ) : IList
trackId string
count int
return IList

SearchArtists() public method

public SearchArtists ( string term, int count = 15, int page = 1 ) : IList
term string
count int
page int
return IList

SearchSongs() public method

public SearchSongs ( string term, string artist = "", int count = 15, int page = 1 ) : IList
term string
artist string
count int
page int
return IList