Documentation ¶
Index ¶
- type GoogleNews
- func (c *GoogleNews) Search(searchTerm string) (*[]models.Article, error)
- func (c *GoogleNews) SearchPeriod(searchTerm string, period string) (*[]models.Article, error)
- func (c *GoogleNews) SearchTimeframe(searchTerm string, after, before string) (*[]models.Article, error)
- func (c *GoogleNews) SearchTopic(topic models.Topic) (*[]models.Article, error)
- func (c *GoogleNews) TopNews() (*[]models.Article, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GoogleNews ¶
A GoogleNews struct represents a connection to google news
If you want to initialize a GoogleNews client, please use googleNews.New()
func (*GoogleNews) Search ¶
func (c *GoogleNews) Search(searchTerm string) (*[]models.Article, error)
Search let's you retrieve articles from a custom search query
func (*GoogleNews) SearchPeriod ¶
SearchPeriod enables searching for a query in a given time period example: period: 7d - search query in articles of the last 7 days
func (*GoogleNews) SearchTimeframe ¶
func (c *GoogleNews) SearchTimeframe(searchTerm string, after, before string) (*[]models.Article, error)
SearchTimeframe is similar to SearchPeriod, making it possible to search between two dates dates should have the format: 2020-06-02
func (*GoogleNews) SearchTopic ¶
SearchTopic queries the /topics endpoint for the given topic
Click to show internal directories.
Click to hide internal directories.