mirror of
https://github.com/Sarsoo/IF.Lastfm.git
synced 2024-10-17 07:13:09 +01:00
Tidying user.getTopAlbums call.
This commit is contained in:
parent
3565a10387
commit
05d93bbd34
@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using IF.Lastfm.Core.Api.Enums;
|
||||
using IF.Lastfm.Core.Api.Helpers;
|
||||
@ -11,14 +10,16 @@ public interface IUserApi
|
||||
{
|
||||
IAuth Auth { get; }
|
||||
|
||||
Task<PageResponse<Album>> GetTopAlbums(LastStatsTimeSpan span,
|
||||
int startIndex = 0,
|
||||
int endIndex = LastFm.DefaultPageLength);
|
||||
Task<PageResponse<Album>> GetTopAlbums(string username,
|
||||
LastStatsTimeSpan span,
|
||||
int startIndex = 0,
|
||||
int endIndex = LastFm.DefaultPageLength);
|
||||
|
||||
Task<PageResponse<Track>> GetRecentScrobbles(string username, DateTime since,
|
||||
int startIndex = 0,
|
||||
int endIndex = LastFm.DefaultPageLength);
|
||||
int startIndex = 0,
|
||||
int endIndex = LastFm.DefaultPageLength);
|
||||
|
||||
Task<PageResponse<Station>> GetRecentStations(int pagenumber, int count = LastFm.DefaultPageLength);
|
||||
Task<PageResponse<Station>> GetRecentStations(int pagenumber,
|
||||
int count = LastFm.DefaultPageLength);
|
||||
}
|
||||
}
|
@ -22,15 +22,16 @@ public UserApi(IAuth auth)
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// TODO paging
|
||||
/// Gets the top albums for the given user.
|
||||
/// </summary>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="span"></param>
|
||||
/// <param name="startIndex"></param>
|
||||
/// <param name="amount"></param>
|
||||
/// <param name="pagenumber"></param>
|
||||
/// <param name="count"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<PageResponse<Album>> GetTopAlbums(LastStatsTimeSpan span, int pagenumber = 0, int count = LastFm.DefaultPageLength)
|
||||
public async Task<PageResponse<Album>> GetTopAlbums(string username, LastStatsTimeSpan span, int pagenumber = 0, int count = LastFm.DefaultPageLength)
|
||||
{
|
||||
var command = new GetTopAlbumsCommand(Auth, Auth.User.Username, span)
|
||||
var command = new GetTopAlbumsCommand(Auth, username, span)
|
||||
{
|
||||
Page = pagenumber,
|
||||
Count = count
|
||||
@ -45,7 +46,7 @@ public async Task<PageResponse<Album>> GetTopAlbums(LastStatsTimeSpan span, int
|
||||
/// <param name="username"></param>
|
||||
/// <param name="since"></param>
|
||||
/// <param name="pagenumber"></param>
|
||||
/// <param name="endIndex"></param>
|
||||
/// <param name="count"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<PageResponse<Track>> GetRecentScrobbles(string username, DateTime since, int pagenumber = 0, int count = LastFm.DefaultPageLength)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user