nenews_types

package
v0.0.0-...-39147ba Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2016 License: BSD-2-Clause Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type News

type News interface {
	Convert() (*Interface.Message, error)
}

type NewsImage

type NewsImage struct {
	Ref   string `json:"ref"` //not set if not have
	Size  string `json:"pixel"`
	Title string `json:"alt"`
	URL   string `json:"src"`
}

func (*NewsImage) Convert

func (p *NewsImage) Convert() *Interface.Image

type NormalNews

type NormalNews struct {
	CoverURL string `json:"-"`
	URL      string `json:"-"`

	ID         string       `json:"docid"`
	ReplyCount int          `json:"replyCount"`
	Title      string       `json:"title"`
	SubTitle   string       `json:"digest"`
	BoardId    string       `json:"replyBoard"`
	PubTime    string       `json:"ptime"`
	SnapTime   string       `json:"-"`
	Body       string       `json:"body"`
	Images     []*NewsImage `json:"img"`

	Replys []Reply `json:"-"`
}

func (*NormalNews) Convert

func (n *NormalNews) Convert() (*Interface.Message, error)

type PhotoSet

type PhotoSet struct {
	ReplyCount int    `json:"-"`
	SnapTime   string `json:"-"`
	Body       string `json:"-"`

	ID       string `json:"postid"`
	CoverURL string `json:"cover"`
	URL      string `json:"url"`
	Title    string `json:"setname"`
	SubTitle string `json:"desc"`
	BoardId  string `json:"boardid"`
	PubTime  string `json:"createdate"`

	Images []*PhototSetImage `json:"photos"`

	Replys []Reply `json:"-"`
}

func (*PhotoSet) Convert

func (n *PhotoSet) Convert() (*Interface.Message, error)

type PhototSetImage

type PhototSetImage struct {
	Desc string `json:"note"`
	URL  string `json:"imgurl"`
}

func (*PhototSetImage) Convert

func (p *PhototSetImage) Convert() *Interface.Image

type Reply

type Reply map[string]*ReplyFloor

func (Reply) Convert

func (r Reply) Convert() (Interface.Reply, error)

type ReplyFloor

type ReplyFloor struct {
	//Floor   int    `json:"-"`
	Time    string `json:"t"`
	Name    string `json:"f"`
	Content string `json:"b"`
	Digg    string `json:"v"`
}

type Reply_tmp

type Reply_tmp struct {
	HotPosts []Reply `json:"hotPosts"`
}

type Topic

type Topic struct {
	Newss []News
	Id    string
	Title string
}

func (*Topic) Convert

func (p *Topic) Convert() []*Interface.Message

Jump to

Keyboard shortcuts

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