feed

package
v0.0.0-...-83adff0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Area2

type Area2 struct {
	ID       int64  `json:"id,omitempty"`
	Name     string `json:"name,omitempty"`
	Children *Area2 `json:"children,omitempty"`
}

type Button

type Button struct {
	Name        string `json:"name,omitempty"`
	URI         string `json:"uri,omitempty"`
	RedirectURI string `json:"redirect_uri,omitempty"`
}

type Category

type Category struct {
	ID       int64     `json:"id,omitempty"`
	Name     string    `json:"name,omitempty"`
	Children *Category `json:"children,omitempty"`
}

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"`
	RedirectURI string      `json:"redirect_uri,omitempty"`
	Param       string      `json:"param,omitempty"`
	Goto        string      `json:"goto,omitempty"`
	ViewType    string      `json:"view_type,omitempty"`
	Kind        string      `json:"kind,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"`
	Share       int         `json:"share,omitempty"`
	Like        int         `json:"like,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 info
	Cid             int64                     `json:"cid,omitempty"`
	Rid             int32                     `json:"tid,omitempty"`
	TName           string                    `json:"tname,omitempty"`
	Tag             *Tag                      `json:"tag,omitempty"`
	DisklikeReasons []*dislike.DisklikeReason `json:"dislike_reasons,omitempty"`
	PTime           xtime.Time                `json:"ctime,omitempty"`
	Autoplay        int32                     `json:"autoplay,omitempty"`
	// av stat
	Duration int64 `json:"duration,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 recommend
	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"`
	// activity
	STime string `json:"stime,omitempty"`
	ETime string `json:"etime,omitempty"`
	// tag
	Tags []*channel.Tag `json:"tags,omitempty"`
	// rank
	Cover1 string `json:"cover1,omitempty"`
	Cover2 string `json:"cover2,omitempty"`
	Cover3 string `json:"cover3,omitempty"`
	// banner`
	Hash string `json:"hash,omitempty"`
	// upper article
	Covers    []string  `json:"covers,omitempty"`
	Temple    int       `json:"temple,omitempty"`
	Template  int       `json:"template,omitempty"`
	Category  *Category `json:"category,omitempty"`
	BannerURL string    `json:"banner_url,omitempty"`
	// game download
	Button   *Button `json:"button,omitempty"`
	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"`
	// news
	Content string `json:"content,omitempty"`
	// bigdata source
	Source    string          `json:"-"`
	AvFeature json.RawMessage `json:"-"`
	// common
	GotoOrg  string `json:"-"`
	FromType string `json:"from_type,omitempty"`
	Pos      int    `json:"-"`
	// audio
	SongTitle string `json:"song_title,omitempty"`
}

Item is feed item,

func (*Item) FromActivity

func (i *Item) FromActivity(a *activity.Activity, now time.Time)

func (*Item) FromArticle

func (i *Item) FromArticle(m *article.Meta)

func (*Item) FromArticleS

func (i *Item) FromArticleS(m *article.Meta)

func (*Item) FromAudio

func (i *Item) FromAudio(a *audio.Audio)

func (*Item) FromChannelRcmd

func (i *Item) FromChannelRcmd(r *operate.Follow, am map[int64]*archive.ArchiveWithPlayer, tagm map[int64]*bustag.Tag)

func (*Item) FromConverge

func (i *Item) FromConverge(c *operate.Converge, am map[int64]*archive.ArchiveWithPlayer, rm map[int64]*cardlive.Room, artm map[int64]*article.Meta)

func (*Item) FromDislikeReason

func (i *Item) FromDislikeReason()

func (*Item) FromGameDownload

func (i *Item) FromGameDownload(d *operate.Download, plat int8, build int)

func (*Item) FromGameDownloadS

func (i *Item) FromGameDownloadS(d *operate.Download, plat int8, build int)

func (*Item) FromLive

func (i *Item) FromLive(r *cardlive.Room)

func (*Item) FromLiveUpRcmd

func (i *Item) FromLiveUpRcmd(id int64, cs []*cardlive.Card, card map[int64]*account.Card)

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 (i *Item) FromPlayerLive(r *cardlive.Room)

func (*Item) FromRcmdReason

func (i *Item) FromRcmdReason(c *card.Card)

func (*Item) FromSeason

func (i *Item) FromSeason(b *bangumi.Season)

func (*Item) FromShoppingS

func (i *Item) FromShoppingS(c *shopping.Shopping)

func (*Item) FromSpecial

func (i *Item) FromSpecial(id int64, title, cover, desc, url string, typ int, badge string, size string)

func (*Item) FromSpecialS

func (i *Item) FromSpecialS(id int64, title, cover, desc, url string, typ int, badge string)

func (*Item) FromSubscribe

func (i *Item) FromSubscribe(r *operate.Follow, card map[int64]*account.Card, follow map[int64]bool, upStatm map[int64]*relation.Stat, tagm map[int64]*bustag.Tag)

func (*Item) FromSubscribeChannel

func (i *Item) FromSubscribeChannel(r *recommend.Item, tags map[int64]*tag.Tag)

func (*Item) FromTopic

func (i *Item) FromTopic(a *activity.Activity)

func (*Item) FromTopstick

func (i *Item) FromTopstick(id int64, title, cover, desc, url string, typ int)

type OfficialInfo

type OfficialInfo struct {
	Role  int8   `json:"role,omitempty"`
	Title string `json:"title,omitempty"`
	Desc  string `json:"desc,omitempty"`
}

type RcmdReason

type RcmdReason struct {
	ID           int    `json:"id,omitempty"`
	Content      string `json:"content,omitempty"`
	BgColor      string `json:"bg_color,omitempty"`
	IconLocation string `json:"icon_location,omitempty"`
	Message      string `json:"message,omitempty"`
}

type Show

type Show struct {
	Topic *Item   `json:"topic,omitempty"`
	Feed  []*Item `json:"feed"`
}

type Show2

type Show2 struct {
	Topic cardm.Handler   `json:"topic,omitempty"`
	Feed  []cardm.Handler `json:"feed"`
}

type Tab

type Tab struct {
	Items []cardm.Handler `json:"items"`
}

type Tag

type Tag struct {
	TagID   int64     `json:"tag_id,omitempty"`
	TagName string    `json:"tag_name,omitempty"`
	IsAtten int8      `json:"is_atten,omitempty"`
	Count   *TagCount `json:"count,omitempty"`
	Name    string    `json:"name,omitempty"`
	URI     string    `json:"uri,omitempty"`
	//channel
	ID   int64  `json:"id,omitempty"`
	Face string `json:"face,omitempty"`
	Fans int    `json:"fans,omitempty"`
}

type TagCount

type TagCount struct {
	Atten int `json:"atten,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL