Initial commit
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
using System.Linq;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace LineMessaging
|
||||
{
|
||||
public class LineErrorResponse
|
||||
{
|
||||
[JsonProperty("message")]
|
||||
public string Message { get; set; }
|
||||
|
||||
[JsonProperty("details")]
|
||||
public DetailObject[] Details { get; set; }
|
||||
|
||||
public class DetailObject
|
||||
{
|
||||
[JsonProperty("message")]
|
||||
public string Message { get; set; }
|
||||
|
||||
[JsonProperty("property")]
|
||||
public string Property { get; set; }
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
if (Details != null && Details.Any())
|
||||
{
|
||||
var details = string.Join(", ", Details.Select(x => $"Property {x.Property} {x.Message}"));
|
||||
return $"{Message}. details: {details}";
|
||||
}
|
||||
|
||||
return Message;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace LineMessaging
|
||||
{
|
||||
public class LineMembers
|
||||
{
|
||||
[JsonProperty("memberIds")]
|
||||
public string[] MemberIds { get; set; }
|
||||
|
||||
[JsonProperty("next")]
|
||||
public string Next { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace LineMessaging
|
||||
{
|
||||
public class LineProfile
|
||||
{
|
||||
[JsonProperty("displayName")]
|
||||
public string DisplayName { get; set; }
|
||||
|
||||
[JsonProperty("userId")]
|
||||
public string UserId { get; set; }
|
||||
|
||||
[JsonProperty("pictureUrl")]
|
||||
public string PictureUrl { get; set; }
|
||||
|
||||
[JsonProperty("statusMessage")]
|
||||
public string StatusMessage { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user