-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.go
92 lines (90 loc) · 2.23 KB
/
types.go
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
package mastodon
const (
public Visibility = "public"
unlisted Visibility = "unlisted"
private Visibility = "private"
direct Visibility = "direct"
)
type (
// Status 嘟文类型
// See https://docs.joinmastodon.org/entities/status/#example
Status struct {
ID string `json:"id"`
CreatedAt string `json:"created_at"`
Content string `json:"content"`
Account Account `json:"account"`
}
// StatusParams 是发嘟时的参数
StatusParams struct {
Status string `json:"status" validate:"required,max=500,min=1"`
MediaIds string `json:"media_ids" validate:"required"`
Poll string `json:"poll" validate:"required"`
InReplyToID string `json:"in_reply_to_id,omitempty"`
Visibility string `json:"visibility,omitempty"`
Sensitive bool `json:"sensitive"`
SpoilerText string `json:"spoiler_text"`
}
// StatusRes 发嘟完的响应体
StatusRes struct {
ID string `json:"id"`
Account Account `json:"account"`
}
// Account 账号
Account struct {
UserName string `json:"username"`
URL string `json:"url"`
}
// Tag 标签
Tag struct {
}
// Emoji 表情包
Emoji struct {
}
// Media 媒体文件
Media struct {
}
// Mention 提及
Mention struct {
}
// Visibility 可见行
Visibility string
// HomeReq 首页列表请求体
HomeReq struct {
maxID string
sinceID string
minID string
limit string
local string
}
// HomeResp 首页列表的返回体
HomeResp struct {
account Account
application interface{}
bookmarked bool
card interface{}
Content string
createdAt string
emojis []Emoji
favourited bool
favouritesCount int8
ID string
inReplyToAccountID string
inReplyToID string
language string
mediaAttachments []Media
mentions []Mention
muted bool
pinned bool
poll interface{}
reblog interface{}
reblogged bool
reblogsCount int8
repliesCount int8
sensitive bool
spoilerText string
tags []Tag
uri string
url string
Visibility Visibility
}
)