Documentation ¶
Overview ¶
Package utils implements some utilities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAPIBusy = errors.New("api busy")
Functions ¶
func FindMails ¶
FindMails finds mails contained in str. If there are patterns LIKE an email address, they are appended to mails.
func LongInterval ¶
func MediumInterval ¶
func OutputAsJSON ¶
func OutputAsJSON(s interface{}) error
func SetAPIServer ¶
func ShortInterval ¶
Types ¶
type APIResult ¶
type APIResult struct { CreateTime int `json:"create_time"` Statistics VideoStats `json:"statistics"` }
APIResult represents the response from API server.
type VideoStats ¶
VideoStats unites videos statistics cared in a structure.
func GetVideoStatsFromAPI ¶
func GetVideoStatsFromAPI(url string) (createdTime int, vs VideoStats, err error)
GetVideoStatsFromAPI sends request to apiServer regarding url. It returns createdTime (time the video was posted) and vs (video statistics).
Click to show internal directories.
Click to hide internal directories.