Initial commit

This commit is contained in:
Chris Chen
2022-09-08 08:04:32 -07:00
commit 184db15773
4604 changed files with 503905 additions and 0 deletions
@@ -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}.";
}
}
}