-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbiliApiInterface.go
206 lines (201 loc) · 4.55 KB
/
biliApiInterface.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
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
package biliApi
import (
"net/http"
"time"
pool "github.com/qydysky/part/pool"
reqf "github.com/qydysky/part/reqf"
)
// copy from target
type biliApiInter interface {
SetReqPool(pool *pool.Buf[reqf.Req])
SetProxy(proxy string)
SetLocation(secOfTimeZone int) // east positive
SetCookies(cookies []*http.Cookie)
GetCookies() (cookies []*http.Cookie)
GetCookie(name string) (error, string)
LikeReport(hitCount, uid, roomid, upUid int) (err error)
LoginQrCode() (err error, imgUrl string, QrcodeKey string)
LoginQrPoll(QrcodeKey string) (err error, code int)
GetOtherCookies() (err error)
GetLiveBuvid(Roomid int) (err error)
GetRoomBaseInfo(Roomid int) (err error, res struct {
UpUid int
Uname string
ParentAreaID int
AreaID int
Title string
LiveStartTime time.Time
Liveing bool
RoomID int
})
GetInfoByRoom(Roomid int) (err error, res struct {
UpUid int
Uname string
ParentAreaID int
AreaID int
Title string
LiveStartTime time.Time
Liveing bool
RoomID int
GuardNum int
Note string
Locked bool
})
GetRoomPlayInfo(Roomid int, Qn int) (err error, res struct {
UpUid int
RoomID int
LiveStartTime time.Time
Liveing bool
Streams []struct {
ProtocolName string
Format []struct {
FormatName string
Codec []struct {
CodecName string
CurrentQn int
AcceptQn []int
BaseURL string
URLInfo []struct {
Host string
Extra string
StreamTTL int
}
HdrQn any
DolbyType int
AttrName string
}
}
}
})
GetDanmuInfo(Roomid int) (err error, res struct {
Token string
WSURL []string
})
GetDanmuMedalAnchorInfo(uid string, Roomid int) (err error, rface string)
GetPopularAnchorRank(uid, upUid, roomid int) (err error, note string)
GetGuardNum(upUid, roomid int) (err error, GuardNum int)
GetNav() (err error, res struct {
IsLogin bool
WbiImg struct {
ImgURL string
SubURL string
}
})
Wbi(query string, WbiImg struct {
ImgURL string
SubURL string
}) (err error, queryEnc string)
GetWearedMedal(uid, upUid int) (err error, res struct {
TodayIntimacy int
RoomID int
TargetID int
})
GetFansMedal(RoomID, TargetID int) (err error, res []struct {
TodayFeed int
TargetID int
IsLighted int
MedalID int
RoomID int
LivingStatus int
})
SetFansMedal(medalId int) (err error)
GetWebGetSignInfo() (err error, Status int)
DoSign() (err error, HadSignDays int)
GetBagList(Roomid int) (err error, res []struct {
Bag_id int
Gift_id int
Gift_name string
Gift_num int
Expire_at int
})
GetWalletStatus() (err error, res struct {
Silver int
Silver2CoinLeft int
})
GetWalletRule() (err error, Silver2CoinPrice int)
Silver2coin() (err error, Message string)
GetHisStream() (err error, res []struct {
Uname string
Title string
Roomid int
LiveStatus int
})
RoomEntryAction(Roomid int) (err error)
GetOnlineGoldRank(upUid, roomid int) (err error, OnlineNum int)
GetFollowing() (err error, res []struct {
Roomid int
Uname string
Title string
LiveStatus int
})
IsConnected() (err error)
GetHisDanmu(Roomid int) (err error, res []string)
SearchUP(s string) (err error, res []struct {
Roomid int
Uname string
Is_live bool
})
LiveHtml(Roomid int) (err error, res struct {
RoomInitRes struct {
Code int
Message string
TTL int
Data struct {
RoomID int
UID int
LiveStatus int
LiveTime int
PlayurlInfo struct {
ConfJSON string
Playurl struct {
Stream []struct {
ProtocolName string
Format []struct {
FormatName string
Codec []struct {
CodecName string
CurrentQn int
AcceptQn []int
BaseURL string
URLInfo []struct {
Host string
Extra string
StreamTTL int
}
HdrQn any
DolbyType int
AttrName string
}
}
}
}
}
}
}
RoomInfoRes struct {
Code int
Message string
TTL int
Data struct {
RoomInfo struct {
Title string
LockStatus int
AreaID int
ParentAreaID int
}
AnchorInfo struct {
BaseInfo struct {
Uname string
}
}
PopularRankInfo struct {
Rank int
RankName string
}
GuardInfo struct {
Count int
}
}
}
})
}