Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSNewsItemsResponse ¶ added in v1.8.0
type AWSNewsItemsResponse struct {
FieldTypes struct {
RelatedBlog string `json:"relatedBlog"`
PostBody string `json:"postBody"`
ModifiedDate string `json:"modifiedDate"`
HeadlineURL string `json:"headlineUrl"`
PostDateTime string `json:"postDateTime"`
PostSummary string `json:"postSummary"`
Headline string `json:"headline"`
ContentType string `json:"contentType"`
} `json:"fieldTypes"`
Items []struct {
Item struct {
AdditionalFields struct {
PostBody string `json:"postBody"`
ModifiedDate time.Time `json:"modifiedDate"`
HeadlineURL string `json:"headlineUrl"`
PostDateTime time.Time `json:"postDateTime"`
PostSummary string `json:"postSummary"`
ContentType string `json:"contentType"`
Headline string `json:"headline"`
} `json:"additionalFields"`
ID string `json:"id"`
Locale string `json:"locale"`
DirectoryID string `json:"directoryId"`
Name string `json:"name"`
CreatedBy string `json:"createdBy"`
LastUpdatedBy string `json:"lastUpdatedBy"`
DateCreated string `json:"dateCreated"`
DateUpdated string `json:"dateUpdated"`
Author string `json:"author"`
NumImpressions int `json:"numImpressions"`
} `json:"item"`
Tags []struct {
ID string `json:"id"`
Locale string `json:"locale"`
TagNamespaceID string `json:"tagNamespaceId"`
Name string `json:"name"`
Description string `json:"description"`
CreatedBy string `json:"createdBy"`
LastUpdatedBy string `json:"lastUpdatedBy"`
DateCreated string `json:"dateCreated"`
DateUpdated string `json:"dateUpdated"`
} `json:"tags"`
} `json:"items"`
Metadata struct {
Count int `json:"count"`
TotalHits int `json:"totalHits"`
} `json:"metadata"`
}
type Announcement ¶
Announcement Represents a single AWS product/feature announcement.
type Announcements ¶
type Announcements []Announcement
Announcements Represents a slice containing all of the AWS announcements for a given time period.
func Fetch ¶
func Fetch(year int, month int) (Announcements, error)
Fetch gets all of the announcements for the specified year/month that was input.
Example ¶
news, err := Fetch(2019, 12)
if err != nil {
// Handle error
}
news.Print()
func FetchYear ¶ added in v0.4.0
func FetchYear(year int) (Announcements, error)
FetchYear gets all of the announcements for the specified year that was input.
Example ¶
news, err := FetchYear(2020)
if err != nil {
// Handle error
}
news.Print()
func ThisMonth ¶
func ThisMonth() (Announcements, error)
ThisMonth gets the current month's AWS announcements.
Example ¶
news, err := ThisMonth()
if err != nil {
// Handle error
}
for _, n := range news {
//nolint
fmt.Println(n.Title)
}
func Today ¶
func Today() (Announcements, error)
Today gets today's AWS announcements.
Example ¶
news, err := Today()
if err != nil {
// Handle error
}
//nolint
fmt.Println(news)
func Yesterday ¶
func Yesterday() (Announcements, error)
Yesterday gets yesterday's AWS announcments.
Example ¶
news, err := Yesterday()
if err != nil {
// Handle error
}
//nolint
fmt.Println(news)
func (Announcements) Filter ¶
func (a Announcements) Filter(p []string) Announcements
Filter accepts a slice of products/terms to only return announcments you care about
func (Announcements) HTML ¶
func (a Announcements) HTML() string
HTML Converts Announcements to an unordered html list.
func (Announcements) JSON ¶
func (a Announcements) JSON() ([]byte, error)
JSON Converts Announcements to JSON.
func (Announcements) Last ¶ added in v0.4.0
func (a Announcements) Last(n int) Announcements
Last returns a set number of news items you specify
func (Announcements) Print ¶
func (a Announcements) Print()
Print Prints out an ASCII table of your selection of AWS announcements.