IF.Lastfm/IF.Lastfm.Core/Api/IAuth.cs
Rikki Tooley 600814d09f Scrobble method!
Also making all ParseJToken methods internal, but using
[assembly:InternalsVisibleTo("IF.Lastfm.Core.Tests")] to make them
testable
2013-06-14 16:19:26 +01:00

24 lines
830 B
C#

using System.Threading.Tasks;
using IF.Lastfm.Core.Api.Helpers;
using IF.Lastfm.Core.Objects;
namespace IF.Lastfm.Core.Api
{
public interface IAuth
{
bool HasAuthenticated { get; }
string ApiKey { get; }
UserSession User { get; }
string ApiSignature { get; }
/// <summary>
/// Gets the session token which is used as authentication for any service calls.
/// Username and password aren't stored.
/// </summary>
/// <param name="username">Username</param>
/// <param name="password">User's password</param>
/// <returns>Session token used to authenticate calls to last.fm</returns>
/// <remarks>API: Auth.getMobileSession</remarks>
Task<LastResponse> GetSessionTokenAsync(string username, string password);
}
}