mirror of
https://github.com/Sarsoo/Spotify.NET.git
synced 2024-12-25 15:36:26 +00:00
25 lines
578 B
C#
25 lines
578 B
C#
|
using System;
|
||
|
using System.Threading.Tasks;
|
||
|
using SpotifyAPI.Web.Http;
|
||
|
using SpotifyAPI.Web.Models;
|
||
|
|
||
|
namespace SpotifyAPI.Web
|
||
|
{
|
||
|
public class UserProfileClient : APIClient, IUserProfileClient
|
||
|
{
|
||
|
public UserProfileClient(IAPIConnector apiConnector) : base(apiConnector) { }
|
||
|
|
||
|
public Task<PrivateUser> Current()
|
||
|
{
|
||
|
return API.Get<PrivateUser>(SpotifyUrls.Me());
|
||
|
}
|
||
|
|
||
|
public Task<PublicUser> Get(string userId)
|
||
|
{
|
||
|
Ensure.ArgumentNotNullOrEmptyString(userId, nameof(userId));
|
||
|
|
||
|
return API.Get<PublicUser>(SpotifyUrls.User(userId));
|
||
|
}
|
||
|
}
|
||
|
}
|