This repository has been archived by the owner on Aug 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
JsonInterfaces.cs
136 lines (96 loc) · 3.41 KB
/
JsonInterfaces.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
using System.Text.Json.Serialization;
namespace ShopeeReplayDownloader.JsonInterfaces;
partial class ShopeeSession
{
[JsonPropertyName("err_code")]
public long ErrorCode { get; set; }
[JsonPropertyName("err_msg")]
public required string ErrorMessage { get; set; }
[JsonPropertyName("data")]
public required ShopeeSessionData Data { get; set; }
}
partial class ShopeeSessionData
{
[JsonPropertyName("record_ids")]
public required long[] RecordIds { get; set; }
}
public partial class ShopeeRecord
{
[JsonPropertyName("err_code")]
public long ErrorCode { get; set; }
[JsonPropertyName("err_msg")]
public required string ErrorMessage { get; set; }
[JsonPropertyName("data")]
public required ShopeeRecordData Data { get; set; }
}
public partial class ShopeeRecordData
{
[JsonPropertyName("endpage_url")]
public required Uri EndpageUrl { get; set; }
[JsonPropertyName("replay_info")]
public required ReplayInfo ReplayInfo { get; set; }
[JsonPropertyName("share_url")]
public required Uri ShareUrl { get; set; }
}
public partial class ReplayInfo
{
[JsonPropertyName("record_id")]
public long RecordId { get; set; }
[JsonPropertyName("session_id")]
public long SessionId { get; set; }
[JsonPropertyName("file_format")]
public required string FileFormat { get; set; }
[JsonPropertyName("record_url")]
public required Uri RecordUrl { get; set; }
[JsonPropertyName("start_time")]
public long StartTime { get; set; }
[JsonPropertyName("end_time")]
public long EndTime { get; set; }
[JsonPropertyName("uid")]
public long Uid { get; set; }
[JsonPropertyName("username")]
public required string Username { get; set; }
[JsonPropertyName("view_count")]
public long ViewCount { get; set; }
[JsonPropertyName("room_id")]
public long RoomId { get; set; }
[JsonPropertyName("title")]
public required string Title { get; set; }
[JsonPropertyName("cover")]
public required string Cover { get; set; }
[JsonPropertyName("description")]
public required string Description { get; set; }
[JsonPropertyName("member_cnt")]
public long MemberCnt { get; set; }
[JsonPropertyName("like_cnt")]
public long LikeCount { get; set; }
[JsonPropertyName("items_cnt")]
public long ItemsCount { get; set; }
[JsonPropertyName("shop_id")]
public long ShopId { get; set; }
[JsonPropertyName("nickname")]
public required string Nickname { get; set; }
[JsonPropertyName("avatar")]
public required string Avatar { get; set; }
[JsonPropertyName("total_views")]
public long TotalViews { get; set; }
[JsonPropertyName("is_generated")]
public bool IsGenerated { get; set; }
[JsonPropertyName("is_passed")]
public bool IsPassed { get; set; }
[JsonPropertyName("is_show_on_shoppage")]
public bool IsShowOnShoppage { get; set; }
[JsonPropertyName("is_recommend")]
public bool IsRecommend { get; set; }
[JsonPropertyName("is_deleted")]
public bool IsDeleted { get; set; }
[JsonPropertyName("is_test")]
public bool IsTest { get; set; }
[JsonPropertyName("flag")]
public long Flag { get; set; }
[JsonPropertyName("share_cnt")]
public long ShareCnt { get; set; }
[JsonPropertyName("is_seller")]
public bool IsSeller { get; set; }
public long EstimatedDuration { get => EndTime - StartTime; }
}