crawler

package
v0.0.0-...-0eb0020 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2014 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

View Source
const (
	Year durationType = iota
	Month
	Week
	Day
	Today
)

Variables

This section is empty.

Functions

func OutputAniversarries

func OutputAniversarries(aniversaries []Anniversary)

Types

type Anniversary

type Anniversary struct {
	Tweets []anaconda.Tweet
}

func ChooseBestAniversary

func ChooseBestAniversary(aniversaries []Anniversary) Anniversary

func (Anniversary) CreateFirstMessage

func (a Anniversary) CreateFirstMessage() string

ex: 「今日はお二人の」

func (Anniversary) CreateFullMessage

func (a Anniversary) CreateFullMessage(first string, second string) string

Tweet用のフルメッセージ(ex: 「@a @bさん、今日はお二人のりんご1周年記念日です!」

func (Anniversary) CreateSecondMessage

func (a Anniversary) CreateSecondMessage() (string, int64)

ex: 「りんご1周年記念日」 ランダム要素が入っているので、毎回結果が異なります。

func (Anniversary) EvaluatedScore

func (a Anniversary) EvaluatedScore() int

func (Anniversary) Names

func (a Anniversary) Names() []string

type Crawler

type Crawler struct {
	Api *anaconda.TwitterApi
}

func NewCrawler

func NewCrawler(accessToken string, accessTokenSecret string) Crawler

func (Crawler) AnalyzeAnniversary

func (c Crawler) AnalyzeAnniversary() []Anniversary

func (Crawler) AnalyzeMentions

func (c Crawler) AnalyzeMentions()

func (Crawler) AnalyzeTimeline

func (c Crawler) AnalyzeTimeline()

func (Crawler) GetOEmbed

func (c Crawler) GetOEmbed(statusId int64, candidates []anaconda.Tweet) anaconda.OEmbed

func (Crawler) PostByAniv

func (c Crawler) PostByAniv(message string) error

type EmbedResponse

type EmbedResponse struct {
	Html string `json:"html"`
}

type Parser

type Parser struct {
}

func (Parser) ParseToNouns

func (parser Parser) ParseToNouns(ss []string) []string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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