Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchAndPostTrends ¶
func GoogleTrendsBot ¶
func GoogleTrendsBot(w http.ResponseWriter, r *http.Request)
func PostMessage ¶
Types ¶
type Attachment ¶
type Attachment struct { Fallback string `json:"fallback"` //"Required plain-text summary of the attachment." Color string `json:"color"` //"#2eb886" Pretext string `json:"pretext"` //"Optional text that appears above the attachment block" AuthorName string `json:"author_name"` //"Bobby Tables" AuthorLink string `json:"author_link"` //"http://flickr.com/bobby/" AuthorIcon string `json:"author_icon"` //"http://flickr.com/icons/bobby.jpg" Title string `json:"title"` //"Slack API Documentation" TitleLink string `json:"title_link"` //"https://api.slack.com/" Text string `json:"text"` //"Optional text that appears within the attachment" Fields []Field `json:"fields"` ImageURL string `json:"image_url"` //"http://my-website.com/path/to/image.jpg" ThumbURL string `json:"thumb_url"` //"http://example.com/path/to/thumb.png" TS string `json:"ts"` //12345678 }
type Channel ¶
type Channel struct { Title string // Daily Search Trends Description string `xml:"description"` // Recent searches Link string `xml:"link"` // https://trends.google.co.jp/trends/trendingsearches/daily?geo=JP // AtomLink `xml:"atom:link,attr"` // https://trends.google.co.jp/trends/trendingsearches/daily/rss?geo=JP Items []Trend `xml:"item"` }
type Message ¶
type Message struct { Channel string `json:"channel"` Text string `json:"text"` Markdown bool `json:"mrkdwn"` Attachments []Attachment `json:"attachments"` }
type NewsItem ¶
type NewsItem struct { Title string `xml:"https://trends.google.co.jp/trends/trendingsearches/daily news_item_title"` // <b>Copa America</b> quarter-finals - Argentina set up Brazil semi-final Snippet string `xml:"https://trends.google.co.jp/trends/trendingsearches/daily news_item_snippet"` // Lionel Messi was quiet for much of the game but he won't mind as Argentina made it through. Have a read of the report. We will return for more <b>Copa America</b> action during the semi-finals. Until then. Article Reactions. Like. 4 likes4. Dislike. 0 dislikes0. URL string `xml:"https://trends.google.co.jp/trends/trendingsearches/daily news_item_url"` // https://www.bbc.co.uk/sport/live/football/48766803 Source string `xml:"https://trends.google.co.jp/trends/trendingsearches/daily news_item_source"` // BBC Sport }
type Trend ¶
type Trend struct { Title string `xml:"title"` // Copa America ApproxTraffic string `xml:"https://trends.google.co.jp/trends/trendingsearches/daily approx_traffic"` // 500,000+ Description string `xml:"description"` // fox sports, Venezuela vs Argentina, argentina copa america, argentina vs venezuela 2019 Link string `xml:"link"` // https://trends.google.co.jp/trends/trendingsearches/daily?geo=US#Copa%20America PubDate string `xml:"pubDate"` // Fri, 28 Jun 2019 13:00:00 -0700 Picture string `xml:"https://trends.google.co.jp/trends/trendingsearches/daily picture"` // https://t2.gstatic.com/images?q=tbn:ANd9GcQHkjNN41ODsg8kdwlXugG21c9CeDnfVu5YMbT8PgPxYPOvFynG8kNlLzCMDGQ53U1z6nljwIXG PictureSource string `xml:"https://trends.google.co.jp/trends/trendingsearches/daily picture_source"` // BBC Sport NewsItems []NewsItem `xml:"https://trends.google.co.jp/trends/trendingsearches/daily news_item"` }
Click to show internal directories.
Click to hide internal directories.