2013-06-11 17:40:22 +01:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Net.Http;
|
2013-06-14 13:11:42 +01:00
|
|
|
|
using System.Net.Http.Headers;
|
|
|
|
|
using System.Threading;
|
2013-06-11 17:40:22 +01:00
|
|
|
|
using System.Threading.Tasks;
|
2013-06-23 20:10:57 +01:00
|
|
|
|
using IF.Lastfm.Core.Api.Commands.AlbumApi;
|
2013-06-13 21:30:18 +01:00
|
|
|
|
using IF.Lastfm.Core.Api.Enums;
|
2013-06-14 13:11:42 +01:00
|
|
|
|
using IF.Lastfm.Core.Api.Helpers;
|
2013-06-11 17:40:22 +01:00
|
|
|
|
using IF.Lastfm.Core.Objects;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using Newtonsoft.Json.Linq;
|
|
|
|
|
|
|
|
|
|
namespace IF.Lastfm.Core.Api
|
|
|
|
|
{
|
|
|
|
|
public class AlbumApi : IAlbumApi
|
|
|
|
|
{
|
|
|
|
|
public IAuth Auth { get; private set; }
|
|
|
|
|
|
|
|
|
|
public AlbumApi(IAuth auth)
|
|
|
|
|
{
|
|
|
|
|
Auth = auth;
|
|
|
|
|
}
|
|
|
|
|
|
2013-06-14 13:11:42 +01:00
|
|
|
|
public async Task<LastResponse<Album>> GetAlbumInfoAsync(string artistname, string albumname, bool autocorrect = false)
|
2013-06-11 17:40:22 +01:00
|
|
|
|
{
|
2013-06-23 20:10:57 +01:00
|
|
|
|
var command = new GetAlbumInfoCommand(Auth, artistname, albumname)
|
|
|
|
|
{
|
|
|
|
|
Autocorrect = autocorrect
|
|
|
|
|
};
|
2013-06-11 17:40:22 +01:00
|
|
|
|
|
2013-06-23 20:10:57 +01:00
|
|
|
|
return await command.ExecuteAsync();
|
2013-06-11 17:40:22 +01:00
|
|
|
|
}
|
|
|
|
|
|
2013-06-15 16:17:37 +01:00
|
|
|
|
public Task<PageResponse<BuyLink>> GetBuyLinksForAlbumAsync(string artist, string album, CountryCode country, bool autocorrect = false)
|
2013-06-14 13:11:42 +01:00
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
2013-06-15 16:17:37 +01:00
|
|
|
|
public Task<PageResponse<Shout>> GetShoutsForAlbumAsync(string artist, string album, bool autocorrect = false, int page = 1,
|
2013-06-14 13:11:42 +01:00
|
|
|
|
int itemsPerPage = LastFm.DefaultPageLength)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
2013-06-15 16:17:37 +01:00
|
|
|
|
public Task<PageResponse<Tag>> GetUserTagsForAlbumAsync(string artist, string album, string username, bool autocorrect = false)
|
2013-06-14 13:11:42 +01:00
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
2013-06-15 16:17:37 +01:00
|
|
|
|
public Task<PageResponse<Tag>> GetTopTagsForAlbumAsync(string artist, string album, bool autocorrect = false)
|
2013-06-14 13:11:42 +01:00
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
|
|
|
|
|
2013-06-15 16:17:37 +01:00
|
|
|
|
public Task<PageResponse<Album>> SearchForAlbumAsync(string album, int page = 1, int itemsPerPage = LastFm.DefaultPageLength)
|
2013-06-14 13:11:42 +01:00
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
}
|
2013-06-11 17:40:22 +01:00
|
|
|
|
}
|
|
|
|
|
}
|