Spotify.NET/SpotifyAPI.Web/Models/Response/AuthorizationCodeTokenResponse.cs
Pawel Bojkowski c4704abae4
Fixing #607 + Refactoring (#608)
* Fixing #607 + Refactoring

Added me/episodes and done some refactoring

* Fixing LibrarySaveEpisodesRequest #607

Fixing the remove of epsides.

* Fixed some issues after review #608

* Fixing some small issues

Co-authored-by: DEV-PBO-DEV <72922549+DEV-PBO-DEV@users.noreply.github.com>
2021-08-10 22:17:51 +02:00

23 lines
626 B
C#

using System;
namespace SpotifyAPI.Web
{
public class AuthorizationCodeTokenResponse: IRefreshableToken
{
public string AccessToken { get; set; } = default!;
public string TokenType { get; set; } = default!;
public int ExpiresIn { get; set; }
public string Scope { get; set; } = default!;
public string RefreshToken { get; set; } = default!;
/// <summary>
/// Auto-Initalized to UTC Now
/// </summary>
/// <value></value>
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public bool IsExpired { get => CreatedAt.AddSeconds(ExpiresIn) <= DateTime.UtcNow; }
}
}