Initial commit
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
namespace LineMessaging
|
||||
{
|
||||
public class LineOAuthTokenResponse
|
||||
{
|
||||
[JsonProperty("access_token")]
|
||||
public string AccessToken { get; set; }
|
||||
|
||||
[JsonProperty("expires_in")]
|
||||
public long UnixtimeExpiresIn { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public DateTime ExpiresIn
|
||||
{
|
||||
get { return UnixtimeExpiresIn.FromUnixTime(); }
|
||||
}
|
||||
|
||||
[JsonProperty("token_type")]
|
||||
public string TokenType { get; set; } = "Bearer";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace LineMessaging
|
||||
{
|
||||
public class LineOAuthErrorResponse
|
||||
{
|
||||
[JsonProperty("error")]
|
||||
public string Error { get; set; }
|
||||
|
||||
[JsonProperty("error_description")]
|
||||
public string Description { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{Error}. description: {Description}.";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user