Documentation ¶
Index ¶
- type Area2
- type Button
- type Card
- type Category
- type Config
- type ConvergeParam
- type Dimension
- type FollowMode
- type IndexParam
- type Infoc
- type Item
- func (i *Item) FromAdAv(adInfo *cm.AdInfo, a *archive.ArchiveWithPlayer)
- func (i *Item) FromAdLarge(adInfo *cm.AdInfo)
- func (i *Item) FromAdWeb(adInfo *cm.AdInfo)
- func (i *Item) FromAdWebS(adInfo *cm.AdInfo)
- func (i *Item) FromArticleS(m *article.Meta)
- func (i *Item) FromAudio(a *audio.Audio)
- func (i *Item) FromAv(a *archive.ArchiveWithPlayer)
- func (i *Item) FromBangumiRcmd(u *bangumi.Update)
- func (i *Item) FromBanner(bs []*banner.Banner, hash string)
- func (i *Item) FromChannelRcmd(r *operate.Follow, am map[int64]*archive.ArchiveWithPlayer, ...)
- func (i *Item) FromConverge(c *operate.Converge, am map[int64]*archive.ArchiveWithPlayer, ...)
- func (i *Item) FromDislikeReason(plat int8, build int)
- func (i *Item) FromGameDownloadS(d *operate.Download, plat int8, build int)
- func (i *Item) FromLive(r *live.Room)
- func (i *Item) FromLiveUpRcmd(id int64, cs []*live.Card, card map[int64]*account.Card)
- func (i *Item) FromLogin()
- func (i *Item) FromNews(r *operate.Active)
- func (i *Item) FromPGCSeason(s *episodegrpc.EpisodeCardsProto)
- func (i *Item) FromPlayer(a *archive.ArchiveWithPlayer)
- func (i *Item) FromPlayerAv(a *archive.ArchiveWithPlayer)
- func (i *Item) FromPlayerLive(r *live.Room)
- func (i *Item) FromRank(ranks []*rank.Rank, am map[int64]*archive.ArchiveWithPlayer)
- func (i *Item) FromRcmd(r *ai.Item)
- func (i *Item) FromRcmdReason(r *ai.RcmdReason)
- func (i *Item) FromSeason(b *bangumi.Season)
- func (i *Item) FromShoppingS(c *show.Shopping)
- func (i *Item) FromSpecial(id int64, title, cover, desc, url string, typ int, badge string, size string)
- func (i *Item) FromSpecialS(id int64, title, cover, square, desc, url string, typ int, badge string)
- func (i *Item) FromSubscribe(r *operate.Follow, card map[int64]*account.Card, follow map[int64]bool, ...)
- func (i *Item) FromTabBanner(r *operate.Active)
- func (i *Item) FromTabCards(r *operate.Active, am map[int64]*archive.ArchiveWithPlayer, ...)
- func (i *Item) FromTabTags(r *operate.Active, am map[int64]*archive.ArchiveWithPlayer, ...)
- func (i *Item) FromUpArticle(m *article.Meta)
- func (i *Item) FromUpBangumi(p *feed.Bangumi)
- func (i *Item) FromUpLive(f *livemdl.Feed)
- func (i *Item) FromWeb(title, cover, uri string)
- type OfficialInfo
- type Option
- type RcmdReason
- type Tag
- type TagCount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Column cdm.ColumnStatus `json:"column"` AutoplayCard int8 `json:"autoplay_card"` FeedCleanAbtest int8 `json:"feed_clean_abtest"` FollowMode *FollowMode `json:"follow_mode,omitempty"` }
type ConvergeParam ¶
type ConvergeParam struct { ID int64 `form:"id" validate:"required,min=1"` MobiApp string `form:"mobi_app"` Device string `form:"device"` Build int `form:"build"` Qn int `form:"qn" default:"0"` Fnver int `form:"fnver" default:"0"` Fnval int `form:"fnval" default:"0"` ForceHost int `form:"force_host"` }
type FollowMode ¶
type IndexParam ¶
type IndexParam struct { Build int `form:"build"` Platform string `form:"platform"` MobiApp string `form:"mobi_app"` Device string `form:"device"` Network string `form:"network"` // idx, err := strconv.ParseInt(idxStr, 10, 64) // if err != nil || idx < 0 { // idx = 0 // } Idx int64 `form:"idx" default:"0"` // pull, err := strconv.ParseBool(pullStr) // if err != nil { // pull = true // } Pull bool `form:"pull" default:"true"` Column cdm.ColumnStatus `form:"column"` // loginEvent, err := strconv.Atoi(loginEventStr) // if err != nil { // loginEvent = 0 // } LoginEvent int `form:"login_event" default:"0"` OpenEvent string `form:"open_event"` BannerHash string `form:"banner_hash"` AdExtra string `form:"ad_extra"` Qn int `form:"qn" default:"0"` Interest string `form:"interest"` Flush int `form:"flush"` AutoPlayCard int `form:"autoplay_card"` Fnver int `form:"fnver" default:"0"` Fnval int `form:"fnval" default:"0"` DeviceType int `form:"device_type"` ParentMode int `form:"parent_mode"` ForceHost int `form:"force_host"` RecsysMode int `form:"recsys_mode"` }
type Item ¶
type Item struct { Title string `json:"title,omitempty"` Subtitle string `json:"subtitle,omitempty"` Cover string `json:"cover,omitempty"` URI string `json:"uri,omitempty"` Redirect string `json:"redirect,omitempty"` Param string `json:"param,omitempty"` Goto string `json:"goto,omitempty"` Desc string `json:"desc,omitempty"` Play int `json:"play,omitempty"` Danmaku int `json:"danmaku,omitempty"` Reply int `json:"reply,omitempty"` Fav int `json:"favorite,omitempty"` Coin int `json:"coin,omitempty"` Like int `json:"like,omitempty"` Dislike int `json:"dislike,omitempty"` Duration int64 `json:"duration,omitempty"` Count int `json:"count,omitempty"` Status int8 `json:"status,omitempty"` Type int8 `json:"type,omitempty"` Badge string `json:"badge,omitempty"` StatType int8 `json:"stat_type,omitempty"` RcmdReason *RcmdReason `json:"rcmd_reason,omitempty"` Item []*Item `json:"item,omitempty"` // sortedset index Idx int64 `json:"idx,omitempty"` // av Cid int64 `json:"cid,omitempty"` Rid int32 `json:"tid,omitempty"` TName string `json:"tname,omitempty"` Tag *Tag `json:"tag,omitempty"` Button *Button `json:"button,omitempty"` DisklikeReasons []*dislike.DisklikeReason `json:"dislike_reasons,omitempty"` CTime xtime.Time `json:"ctime,omitempty"` Autoplay int32 `json:"autoplay,omitempty"` // upper Mid int64 `json:"mid,omitempty"` Name string `json:"name,omitempty"` Face string `json:"face,omitempty"` IsAtten int8 `json:"is_atten,omitempty"` Fans int64 `json:"fans,omitempty"` RecCnt int `json:"recent_count,omitempty"` Recent []*Item `json:"recent,omitempty"` Official *OfficialInfo `json:"official,omitempty"` // live Online int `json:"online,omitempty"` Area string `json:"area,omitempty"` AreaID int `json:"area_id,omitempty"` Area2 *Area2 `json:"area2,omitempty"` // bangumi Index string `json:"index,omitempty"` IndexTitle string `json:"index_title,omitempty"` CoverMark string `json:"cover_mark,omitempty"` Finish bool `json:"finish,omitempty"` LatestIndex string `json:"last_index,omitempty"` // bangumi ai Updates int `json:"updates,omitempty"` // live or bangumi From int8 `json:"from,omitempty"` // adviertisement RequestID string `json:"request_id,omitempty"` CreativeID int64 `json:"creative_id,omitempty"` SrcID int `json:"src_id,omitempty"` IsAd bool `json:"is_ad,omitempty"` IsAdLoc bool `json:"is_ad_loc,omitempty"` AdCb string `json:"ad_cb,omitempty"` ShowURL string `json:"show_url,omitempty"` ClickURL string `json:"click_url,omitempty"` ClientIP string `json:"client_ip,omitempty"` CmMark int64 `json:"cm_mark,omitempty"` AdIndex int `json:"ad_index,omitempty"` Extra json.RawMessage `json:"extra,omitempty"` CardIndex int `json:"card_index,omitempty"` // tag Tags []*tag.Tag `json:"tags,omitempty"` // rank Cover1 string `json:"cover1,omitempty"` Cover2 string `json:"cover2,omitempty"` Cover3 string `json:"cover3,omitempty"` // banner BannerItem []*banner.Banner `json:"banner_item,omitempty"` Hash string `json:"hash,omitempty"` // article Covers []string `json:"covers,omitempty"` Template int `json:"template,omitempty"` Temple int `json:"temple,omitempty"` Category *Category `json:"category,omitempty"` BannerURL string `json:"banner_url,omitempty"` // game download Download int32 `json:"download,omitempty"` BigCover string `json:"big_cover,omitempty"` // special HideBadge bool `json:"hide_badge,omitempty"` Ratio float64 `json:"ratio,omitempty"` // shopping City string `json:"city,omitempty"` PType string `json:"ptype,omitempty"` Price string `json:"price,omitempty"` Square string `json:"square,omitempty"` STime string `json:"stime,omitempty"` ETime string `json:"etime,omitempty"` // news Content string `json:"content,omitempty"` // subscribe Kind string `json:"kind,omitempty"` // audio SongTitle string `json:"song_title,omitempty"` // bigdata source Source string `json:"-"` AvFeature json.RawMessage `json:"-"` // common GotoOrg string `json:"-"` // rank score Score string `json:"score,omitempty"` // ai recommend AI *ai.Item `json:"-"` // abtest AutoplayCard int `json:"autoplay_card,omitempty"` }
Item is feed item, contains av, bangumi, live, banner, feed...
func (*Item) FromAdLarge ¶
func (*Item) FromAdWebS ¶
func (*Item) FromArticleS ¶
func (*Item) FromAv ¶
func (i *Item) FromAv(a *archive.ArchiveWithPlayer)
func (*Item) FromBangumiRcmd ¶
func (*Item) FromChannelRcmd ¶
func (*Item) FromConverge ¶
func (*Item) FromDislikeReason ¶
func (*Item) FromGameDownloadS ¶
func (*Item) FromLiveUpRcmd ¶
func (*Item) FromPGCSeason ¶
func (i *Item) FromPGCSeason(s *episodegrpc.EpisodeCardsProto)
func (*Item) FromPlayer ¶
func (i *Item) FromPlayer(a *archive.ArchiveWithPlayer)
func (*Item) FromPlayerAv ¶
func (i *Item) FromPlayerAv(a *archive.ArchiveWithPlayer)
func (*Item) FromPlayerLive ¶
func (*Item) FromRcmdReason ¶
func (i *Item) FromRcmdReason(r *ai.RcmdReason)
func (*Item) FromSeason ¶
func (*Item) FromShoppingS ¶
func (*Item) FromSpecial ¶
func (*Item) FromSpecialS ¶
func (*Item) FromSubscribe ¶
func (i *Item) FromSubscribe(r *operate.Follow, card map[int64]*account.Card, follow map[int64]bool, statm map[int64]*relation.Stat, tagm map[int64]*bustag.Tag)
最多配10张卡片 取3个未关注的 不足则不显示该卡片
func (*Item) FromTabBanner ¶
func (*Item) FromTabCards ¶
func (*Item) FromTabTags ¶
func (*Item) FromUpArticle ¶
func (*Item) FromUpBangumi ¶
func (*Item) FromUpLive ¶
type OfficialInfo ¶
type RcmdReason ¶
type Tag ¶
type Tag struct { // new ID int64 `json:"id,omitempty"` Name string `json:"name,omitempty"` Face string `json:"face,omitempty"` Fans int `json:"fans,omitempty"` IsAtten int8 `json:"is_atten,omitempty"` URI string `json:"uri,omitempty"` // old TagID int64 `json:"tag_id,omitempty"` TagName string `json:"tag_name,omitempty"` Count *TagCount `json:"count,omitempty"` }
Click to show internal directories.
Click to hide internal directories.