IF.Lastfm/IF.Lastfm.Core/Api/ArtistApi.cs
2013-07-24 07:59:07 +01:00

65 lines
2.0 KiB
C#

using System;
using System.Threading;
using System.Threading.Tasks;
using IF.Lastfm.Core.Api.Commands.ArtistApi;
using IF.Lastfm.Core.Api.Helpers;
using IF.Lastfm.Core.Objects;
namespace IF.Lastfm.Core.Api
{
public class ArtistApi : IArtistApi
{
public IAuth Auth { get; private set; }
public ArtistApi(IAuth auth)
{
Auth = auth;
}
public async Task<LastResponse<Artist>> GetArtistInfoAsync(string artist,
string bioLang = LastFm.DefaultLanguageCode,
bool autocorrect = false)
{
var command = new GetArtistInfoCommand(Auth, artist)
{
BioLanguage = bioLang,
Autocorrect = autocorrect
};
return await command.ExecuteAsync();
}
public async Task<PageResponse<Album>> GetTopAlbumsForArtistAsync(string artist,
bool autocorrect = false,
int page = 1,
int itemsPerPage = LastFm.DefaultPageLength)
{
throw new NotImplementedException();
}
public async Task<PageResponse<Tag>> GetUserTagsForArtistAsync(string artist,
string username,
bool autocorrect = false,
int page = 1,
int itemsPerPage = LastFm.DefaultPageLength)
{
throw new NotImplementedException();
}
public async Task<PageResponse<Tag>> GetTopTagsForArtistAsync(string artist, bool autocorrect = false)
{
throw new NotImplementedException();
}
public async Task<PageResponse<Shout>> GetShoutsForArtistAsync(string artist, int page = 0, int count = LastFm.DefaultPageLength, bool autocorrect = false)
{
var command = new GetArtistShoutsCommand(Auth, artist)
{
Autocorrect = autocorrect,
Page = page,
Count = count
};
return await command.ExecuteAsync();
}
}
}