Documentation ¶
Index ¶
- Constants
- type BaseFetcher
- func (f *BaseFetcher) Block(string) string
- func (f *BaseFetcher) GetPush(string, []string) []ReplyMessage
- func (f *BaseFetcher) GetPushAtLeastOne(userid string, following []string) (ret []ReplyMessage)
- func (f *BaseFetcher) GoBack(string, int64) error
- func (f *BaseFetcher) HTTPGet(url string) ([]byte, error)
- func (f *BaseFetcher) Init(db *storm.DB, _ string) error
- type ExampleFetcher
- type Fetcher
- type ReplyMessage
- type Resource
- type TumblrFetcher
- type TumblrPosts
- type TwitterFetcher
- type V2EXFetcher
- type V2EXHot
Constants ¶
View Source
const ( TIMAGE = iota TVIDEO )
View Source
const (
MaxTweetCount = "20"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseFetcher ¶
func (*BaseFetcher) Block ¶ added in v0.1.6
func (f *BaseFetcher) Block(string) string
func (*BaseFetcher) GetPush ¶
func (f *BaseFetcher) GetPush(string, []string) []ReplyMessage
For channel update
func (*BaseFetcher) GetPushAtLeastOne ¶
func (f *BaseFetcher) GetPushAtLeastOne(userid string, following []string) (ret []ReplyMessage)
For user request update
type ExampleFetcher ¶
type ExampleFetcher struct {
BaseFetcher
}
func (*ExampleFetcher) GetPush ¶
func (f *ExampleFetcher) GetPush(string, []string) []ReplyMessage
type Fetcher ¶
type Fetcher interface { Init(*storm.DB, string) error // Initializing GetPush(string, []string) []ReplyMessage // For channel message GetPushAtLeastOne(string, []string) []ReplyMessage // For user message GoBack(string, int64) error // Set last update time to N seconds before Block(string) string }
type ReplyMessage ¶
type TumblrFetcher ¶
type TumblrFetcher struct { BaseFetcher OAuthConsumerKey string `json:"consumer_key"` OAuthConsumerSecret string `json:"consumer_secret"` OAuthToken string `json:"access_token"` OAuthTokenSecret string `json:"access_token_secret"` // contains filtered or unexported fields }
func (*TumblrFetcher) Block ¶ added in v0.1.6
func (f *TumblrFetcher) Block(caption string) string
func (*TumblrFetcher) GetPush ¶
func (f *TumblrFetcher) GetPush(userid string, followings []string) []ReplyMessage
type TumblrPosts ¶
type TumblrPosts struct { Meta struct { Status int `json:"status"` Msg string `json:"msg"` } `json:"meta"` Response struct { Posts []struct { Type string `json:"type"` BlogName string `json:"blog_name"` ID int64 `json:"id"` PostURL string `json:"post_url"` Slug string `json:"slug"` Date string `json:"date"` Timestamp int `json:"timestamp"` State string `json:"state"` Format string `json:"format"` ShortURL string `json:"short_url"` IsBlocksPostFormat bool `json:"is_blocks_post_format"` SourceURL string `json:"source_url,omitempty"` SourceTitle string `json:"source_title,omitempty"` Caption string `json:"caption,omitempty"` Reblog struct { Comment string `json:"comment"` TreeHTML string `json:"tree_html"` } `json:"reblog"` Trail []struct { Post struct { ID interface{} `json:"id"` } `json:"post"` ContentRaw string `json:"content_raw"` Content string `json:"content"` } `json:"trail"` VideoURL string `json:"video_url,omitempty"` ThumbnailURL string `json:"thumbnail_url,omitempty"` ThumbnailWidth int `json:"thumbnail_width,omitempty"` ThumbnailHeight int `json:"thumbnail_height,omitempty"` Duration int `json:"duration,omitempty"` VideoType string `json:"video_type,omitempty"` DisplayAvatar bool `json:"display_avatar"` PhotosetLayout string `json:"photoset_layout,omitempty"` Photos []struct { Caption string `json:"caption"` OriginalSize struct { URL string `json:"url"` Width int `json:"width"` Height int `json:"height"` } `json:"original_size"` } `json:"photos,omitempty"` ImagePermalink string `json:"image_permalink,omitempty"` Title string `json:"title,omitempty"` Body string `json:"body,omitempty"` } `json:"posts"` } `json:"response"` }
type TwitterFetcher ¶
type TwitterFetcher struct { BaseFetcher AccessToken string `json:"access_token"` AccessToeknSecret string `json:"access_token_secret"` ConsumerKey string `json:"consumer_key"` ConsumerSecret string `json:"consumer_secret"` // contains filtered or unexported fields }
func (*TwitterFetcher) GetPush ¶
func (f *TwitterFetcher) GetPush(userid string, followings []string) []ReplyMessage
type V2EXFetcher ¶
type V2EXFetcher struct {
BaseFetcher
}
func (*V2EXFetcher) GetPush ¶
func (f *V2EXFetcher) GetPush(string, []string) []ReplyMessage
type V2EXHot ¶
type V2EXHot []struct { ID int `json:"id"` Title string `json:"title"` URL string `json:"url"` Content string `json:"content"` ContentRendered string `json:"content_rendered"` Replies int `json:"replies"` Member struct { ID int `json:"id"` Username string `json:"username"` Tagline string `json:"tagline"` AvatarMini string `json:"avatar_mini"` AvatarNormal string `json:"avatar_normal"` AvatarLarge string `json:"avatar_large"` } `json:"member"` Node struct { ID int `json:"id"` Name string `json:"name"` Title string `json:"title"` TitleAlternative string `json:"title_alternative"` URL string `json:"url"` Topics int `json:"topics"` AvatarMini string `json:"avatar_mini"` AvatarNormal string `json:"avatar_normal"` AvatarLarge string `json:"avatar_large"` } `json:"node"` Created int `json:"created"` LastModified int `json:"last_modified"` LastTouched int `json:"last_touched"` }
Click to show internal directories.
Click to hide internal directories.