Documentation ¶
Index ¶
- Constants
- func GetSign(secret, uri string, params map[string]string) string
- type AllLive
- type AllLiveResponse
- type BaseClient
- type BatchGetRoomInfo
- type BatchGetRoomInfoResponse
- type BatchRoomShowStream
- type BatchRoomShowStreamResponse
- type Cid1Info
- type Cid1InfoResponse
- type Cid2Info
- type Cid2InfoResponse
- type Cid3Info
- type Cid3InfoResponse
- type ErrorResponse
- type GetAudioPlay
- type GetAudioPlayResponse
- type GetDanMuList
- type GetDanMuListResponse
- type GetPlay
- type GetPlayResponse
- type GetRoomInfo
- type GetRoomInfoResponse
- type IDFAInfo
- type IDFAResponse
- type Live
- type LiveResponse
- type OuterChat
- type OuterChatResponse
- type RecompoolVodList
- type RecompoolVodListResponse
- type SmartCateList
- type SmartCateListResponse
- type SmartCateRoomList
- type SmartCateRoomListResponse
- type ThirdVodStreamList
- type ThirdVodStreamListResponse
- type Token
- type TokenResponse
- type VideoCateList
- type VideoCateListResponse
- type VideoCateVodList
- type VideoCateVodListResponse
- type VideoUperVodList
- type VideoUperVodListResponse
- type VodDownURL
- type VodDownURLResponse
Constants ¶
const DouYuDomain = "https://openapi.douyu.com"
DouYuDomain ...
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AllLiveResponse ¶
type AllLiveResponse struct { ErrorResponse Data []struct { RID int `json:"rid"` RoomName string `json:"room_name"` RoomSrc string `json:"room_src"` Hn int `json:"hn"` Nickname string `json:"nickname"` Avatar string `json:"avatar"` Cid1 int `json:"cid1"` Cname1 string `json:"cname1"` Cid2 int `json:"cid2"` Cname2 string `json:"cname2"` Cid3 int `json:"cid3"` Cname3 string `json:"cname3"` } `json:"data"` }
AllLiveResponse ...
type BaseClient ¶
type BaseClient struct { Client *utils.HTTPClient Secret string AID string }
BaseClient base client
type BatchGetRoomInfo ¶
type BatchGetRoomInfo struct { BaseClient Token string }
BatchGetRoomInfo ...
func (*BatchGetRoomInfo) Handle ¶
func (p *BatchGetRoomInfo) Handle(postJSON, timestamp string) (*BatchGetRoomInfoResponse, error)
Handle ...
type BatchGetRoomInfoResponse ¶
type BatchGetRoomInfoResponse struct { ErrorResponse Data []struct { RID int `json:"rid"` RoomSrc string `json:"room_src"` RoomSrcMax string `json:"room_src_max"` RoomName string `json:"room_name"` Hn int `json:"hn"` Nickname string `json:"nickname"` Avatar string `json:"avatar"` Cid1 int `json:"cid1"` Cname1 string `json:"cname1"` Cid2 int `json:"cid2"` Cname2 string `json:"cname2"` Cid3 int `json:"cid3"` Cname3 string `json:"cname3"` ShowStatus int `json:"show_status"` RoomNotice string `json:"room_notice"` IsVertical int `json:"is_vertical"` } `json:"data"` }
BatchGetRoomInfoResponse ...
type BatchRoomShowStream ¶
type BatchRoomShowStream struct { BaseClient Token string }
BatchRoomShowStream ...
func (*BatchRoomShowStream) Handle ¶
func (p *BatchRoomShowStream) Handle(postJSON, timestamp string) (*BatchRoomShowStreamResponse, error)
Handle ...
type BatchRoomShowStreamResponse ¶
type BatchRoomShowStreamResponse struct { ErrorResponse Data struct { RtmpID int `json:"rtmp_id"` RID int `json:"rid"` Nfv string `json:"nfv"` } `json:"data"` }
BatchRoomShowStreamResponse ...
type Cid1InfoResponse ¶
type Cid1InfoResponse struct { ErrorResponse Data []struct { CID1 int `json:"cid1"` CName1 string `json:"cname1"` } `json:"data"` }
Cid1InfoResponse ...
type Cid2InfoResponse ¶
type Cid2InfoResponse struct { ErrorResponse Data []struct { CID2 int `json:"cid2"` CName2 string `json:"cname2"` PicURL string `json:"pic_url"` } `json:"data"` }
Cid2InfoResponse ...
type Cid3InfoResponse ¶
type Cid3InfoResponse struct { ErrorResponse Data []struct { CID3 int `json:"cid3"` CName3 string `json:"cname3"` } `json:"data"` }
Cid3InfoResponse ...
type ErrorResponse ¶
ErrorResponse ...
func (*ErrorResponse) GetErrResponse ¶
func (e *ErrorResponse) GetErrResponse() error
GetErrResponse ...
type GetAudioPlay ¶
type GetAudioPlay struct { BaseClient Token string }
GetAudioPlay ...
func (*GetAudioPlay) Handle ¶
func (p *GetAudioPlay) Handle(postJSON, timestamp string) (*GetAudioPlayResponse, error)
Handle ...
type GetAudioPlayResponse ¶
type GetAudioPlayResponse struct { ErrorResponse Data []struct { RID int `json:"rid"` UID int `json:"uid"` RtmpCdn string `json:"rtmpCdn"` RtmpLive string `json:"rtmpLive"` RtmpURL string `json:"rtmpURL"` } `json:"data"` }
GetAudioPlayResponse ...
type GetDanMuList ¶
type GetDanMuList struct { BaseClient Token string }
GetDanMuList ...
func (*GetDanMuList) Handle ¶
func (p *GetDanMuList) Handle(postJSON, timestamp string) (*GetDanMuListResponse, error)
Handle ...
type GetDanMuListResponse ¶
type GetDanMuListResponse struct { ErrorResponse Data struct { List []struct { RoomID int `json:"room_id"` UID int `json:"uid"` Nickname string `json:"nickname"` Content string `json:"content"` Timestamp int `json:"timestamp"` IP string `json:"ip"` } `json:"list"` Cnt int `json:"cnt"` PageContext int `json:"page_context"` } `json:"data"` }
GetDanMuListResponse ...
type GetPlayResponse ¶
type GetPlayResponse struct { ErrorResponse Data struct { RID int `json:"rid"` RoomName string `json:"room_name"` LiveURL string `json:"live_url"` HlsURL string `json:"hls_url"` MixURL string `json:"mix_url"` RateSwitch int `json:"rate_switch"` ShowStatus int `json:"show_status"` HlsMul interface{} `json:"hls_mul"` FlvMul interface{} `json:"flv_mul"` } `json:"data"` }
GetPlayResponse ...
type GetRoomInfo ¶
type GetRoomInfo struct { BaseClient Token string }
GetRoomInfo ...
func (*GetRoomInfo) Handle ¶
func (p *GetRoomInfo) Handle(postJSON, timestamp string) (*GetRoomInfoResponse, error)
Handle ...
type GetRoomInfoResponse ¶
type GetRoomInfoResponse struct { ErrorResponse Data struct { RID int `json:"rid"` RoomSrc string `json:"room_src"` RoomSrcMax string `json:"room_src_max"` RoomName string `json:"room_name"` Hn int `json:"hn"` Nickname string `json:"nickname"` Avatar string `json:"avatar"` Cid1 int `json:"cid1"` Cname1 string `json:"cname1"` Cid2 int `json:"cid2"` Cname2 string `json:"cname2"` Cid3 int `json:"cid3"` Cname3 string `json:"cname3"` ShowStatus int `json:"show_status"` ShowTime int `json:"show_time"` Unuid string `json:"unuid"` RoomNotice string `json:"room_notice"` IsVertical int `json:"is_vertical"` Fans int `json:"fans"` } `json:"data"` }
GetRoomInfoResponse ...
type IDFAResponse ¶
type IDFAResponse struct { ErrorResponse Data map[string]int `json:"data"` }
IDFAResponse ...
type LiveResponse ¶
type LiveResponse struct { ErrorResponse Data []struct { RID int `json:"rid"` RoomName string `json:"room_name"` RoomSrc string `json:"room_src"` Hn int `json:"hn"` Nickname string `json:"nickname"` Avatar string `json:"avatar"` Cid1 int `json:"cid1"` Cname1 string `json:"cname1"` Cid2 int `json:"cid2"` Cname2 string `json:"cname2"` Cid3 int `json:"cid3"` Cname3 string `json:"cname3"` } `json:"data"` }
LiveResponse ...
type OuterChatResponse ¶
type OuterChatResponse struct { ErrorResponse Data string `json:"data"` }
OuterChatResponse ...
type RecompoolVodList ¶
type RecompoolVodList struct { BaseClient Token string }
RecompoolVodList ...
func (*RecompoolVodList) Handle ¶
func (p *RecompoolVodList) Handle(postJSON, timestamp string) (*RecompoolVodListResponse, error)
Handle ...
type RecompoolVodListResponse ¶
type RecompoolVodListResponse struct { ErrorResponse Data []struct { HashID string `json:"hash_id"` Cid1 int `json:"cid1"` Cid2 int `json:"cid2"` UpID string `json:"up_id"` Nickname string `json:"nickname"` IsVertical int `json:"is_vertical"` VideoTitle string `json:"video_title"` VideoCover string `json:"video_cover"` VideoVerticalCover string `json:"video_vertical_cover"` VideoDuration int `json:"video_duration"` ViewNum int `json:"view_num"` UTime int `json:"utime"` OwnerAvatar string `json:"owner_avatar"` VideoCollectNum int `json:"video_collect_num"` VideoUpNum int `json:"video_up_num"` BarrageNum int `json:"barrage_num"` VideoURL string `json:"video_url"` H5VideoURL string `json:"h5_video_url"` ShareURL string `json:"share_url"` } `json:"data"` }
RecompoolVodListResponse ...
type SmartCateList ¶
type SmartCateList struct { BaseClient Token string }
SmartCateList ...
func (*SmartCateList) Handle ¶
func (p *SmartCateList) Handle(postJSON, timestamp string) (*SmartCateListResponse, error)
Handle ...
type SmartCateListResponse ¶
type SmartCateListResponse struct { ErrorResponse Data []struct { Tag1ID int `json:"tag1_id"` Tag1Name string `json:"tag1_name"` Tag1Icon string `json:"tag1_icon"` Tag2ID int `json:"tag2_id"` Tag2Name string `json:"tag2_name"` Tag2Icon string `json:"tag2_icon"` RoomCount int `json:"room_count"` } `json:"data"` }
SmartCateListResponse ...
type SmartCateRoomList ¶
type SmartCateRoomList struct { BaseClient Token string }
SmartCateRoomList ...
func (*SmartCateRoomList) Handle ¶
func (p *SmartCateRoomList) Handle(postJSON, timestamp string) (*SmartCateRoomListResponse, error)
Handle ...
type SmartCateRoomListResponse ¶
type SmartCateRoomListResponse struct { ErrorResponse Data []struct { RID int `json:"rid"` RoomSrc string `json:"room_src"` RoomSrcMax string `json:"room_src_max"` RoomName string `json:"room_name"` Hn int `json:"hn"` Nickname string `json:"nickname"` Avatar string `json:"avatar"` Cid1 int `json:"cid1"` Cname1 string `json:"cname1"` Cid2 int `json:"cid2"` Cname2 string `json:"cname2"` Cid3 int `json:"cid3"` Cname3 string `json:"cname3"` RoomNotice string `json:"room_notice"` IsVertical int `json:"is_vertical"` ShowStatus int `json:"show_status"` Tag2ID int `json:"tag2_id"` Tag2Name string `json:"tag2_name"` Tag2Icon string `json:"tag2_icon"` Count int `json:"count"` } `json:"data"` }
SmartCateRoomListResponse ...
type ThirdVodStreamList ¶
type ThirdVodStreamList struct { BaseClient Token string }
ThirdVodStreamList ...
func (*ThirdVodStreamList) Handle ¶
func (p *ThirdVodStreamList) Handle(postJSON, timestamp string) (*ThirdVodStreamListResponse, error)
Handle ...
type ThirdVodStreamListResponse ¶
type ThirdVodStreamListResponse struct { ErrorResponse Data struct { Timestamp int `json:"timestamp"` Normal string `json:"normal"` High string `json:"high"` } `json:"data"` }
ThirdVodStreamListResponse ...
type TokenResponse ¶
type TokenResponse struct { ErrorResponse Data struct { Token string `json:"token"` Expire int `json:"expire"` } `json:"data"` }
TokenResponse ...
type VideoCateList ¶
type VideoCateList struct { BaseClient Token string }
VideoCateList ...
func (*VideoCateList) Handle ¶
func (p *VideoCateList) Handle(timestamp string) (*VideoCateListResponse, error)
Handle ...
type VideoCateListResponse ¶
type VideoCateListResponse struct { ErrorResponse Data []struct { Cid2 int `json:"cid2"` Cname2 string `json:"cname2"` } `json:"data"` }
VideoCateListResponse ...
type VideoCateVodList ¶
type VideoCateVodList struct { BaseClient Token string }
VideoCateVodList ...
func (*VideoCateVodList) Handle ¶
func (p *VideoCateVodList) Handle(postJSON, timestamp string) (*VideoCateVodListResponse, error)
Handle ...
type VideoCateVodListResponse ¶
type VideoCateVodListResponse struct { ErrorResponse Data []struct { HashID string `json:"hash_id"` Cid1 int `json:"cid1"` Cid2 int `json:"cid2"` UpID string `json:"up_id"` Nickname string `json:"nickname"` IsVertical int `json:"is_vertical"` VideoTitle string `json:"video_title"` VideoCover string `json:"video_cover"` VideoVerticalCover string `json:"video_vertical_cover"` VideoDuration int `json:"video_duration"` ViewNum int `json:"view_num"` UTime int `json:"utime"` OwnerAvatar string `json:"owner_avatar"` VideoCollectNum int `json:"video_collect_num"` VideoUpNum int `json:"video_up_num"` BarrageNum int `json:"barrage_num"` VideoURL string `json:"video_url"` H5VideoURL string `json:"h5_video_url"` ShareURL string `json:"share_url"` } `json:"data"` }
VideoCateVodListResponse ...
type VideoUperVodList ¶
type VideoUperVodList struct { BaseClient Token string }
VideoUperVodList ...
func (*VideoUperVodList) Handle ¶
func (p *VideoUperVodList) Handle(postJSON, timestamp string) (*VideoUperVodListResponse, error)
Handle ...
type VideoUperVodListResponse ¶
type VideoUperVodListResponse struct { ErrorResponse Data []struct { HashID string `json:"hash_id"` Cid1 int `json:"cid1"` Cid2 int `json:"cid2"` UpID string `json:"up_id"` Nickname string `json:"nickname"` IsVertical int `json:"is_vertical"` VideoTitle string `json:"video_title"` VideoCover string `json:"video_cover"` VideoVerticalCover string `json:"video_vertical_cover"` VideoDuration int `json:"video_duration"` ViewNum int `json:"view_num"` UTime int `json:"utime"` OwnerAvatar string `json:"owner_avatar"` VideoCollectNum int `json:"video_collect_num"` VideoUpNum int `json:"video_up_num"` BarrageNum int `json:"barrage_num"` VideoURL string `json:"video_url"` H5VideoURL string `json:"h5_video_url"` ShareURL string `json:"share_url"` } `json:"data"` }
VideoUperVodListResponse ...
type VodDownURL ¶
type VodDownURL struct { BaseClient Token string }
VodDownURL ...
func (*VodDownURL) Handle ¶
func (p *VodDownURL) Handle(postJSON, timestamp string) (*VodDownURLResponse, error)
Handle ...
type VodDownURLResponse ¶
type VodDownURLResponse struct { ErrorResponse Data struct { URL string `json:"url"` } `json:"data"` }
VodDownURLResponse ...
Source Files ¶
- all_live.go
- batch_get_room_info.go
- batch_room_show_stream.go
- common.go
- get_audio_play.go
- get_cid1_info.go
- get_cid2_info.go
- get_cid3_info.go
- get_dan_mu_list.go
- get_play.go
- get_room_info.go
- idfa.go
- live.go
- outer_chat.go
- recompool_vod_list.go
- sign.go
- smart_cate_list.go
- smart_cate_room_list.go
- third_vod_stream.go
- token.go
- video_cate_list.go
- video_cate_vod_list.go
- video_uper_vod_list.go
- vod_down_url.go