Documentation
¶
Index ¶
Constants ¶
View Source
const ( BIZCatalogURL = "https://a.4cdn.org/biz/catalog.json" BIZThreadLinkURL = "https://boards.4channel.org/biz/thread" )
View Source
const ( ThreadsCSVFile = "threads.csv" CSVSeparator = '|' )
Variables ¶
This section is empty.
Functions ¶
func GetKeywords ¶
func GetKeywords() []string
GetKeywords func returns the mandatory keywords defined from config
func PeriodicCheck ¶
PeriodicCheck will request the 4chan API regularly for latest posts
Types ¶
type APIThread ¶
type APIThread struct {
No int `json:"no"`
Sticky int `json:"sticky,omitempty"`
Closed int `json:"closed,omitempty"`
Now string `json:"now"`
Name string `json:"name"`
Sub string `json:"sub,omitempty"`
Com string `json:"com,omitempty"`
Filename string `json:"filename"`
Ext string `json:"ext"`
W int `json:"w"`
H int `json:"h"`
TnW int `json:"tn_w"`
TnH int `json:"tn_h"`
Tim int64 `json:"tim"`
Time int `json:"time"`
Md5 string `json:"md5"`
Fsize int `json:"fsize"`
Resto int `json:"resto"`
ID string `json:"id"`
Capcode string `json:"capcode,omitempty"`
SemanticURL string `json:"semantic_url"`
Replies int `json:"replies"`
Images int `json:"images"`
LastModified int `json:"last_modified"`
Bumplimit int `json:"bumplimit,omitempty"`
Imagelimit int `json:"imagelimit,omitempty"`
OmittedPosts int `json:"omitted_posts,omitempty"`
OmittedImages int `json:"omitted_images,omitempty"`
LastReplies []LastReply `json:"last_replies,omitempty"`
}
type CatalogPageItems ¶
type CatalogResponse ¶
type CatalogResponse []CatalogPageItems
type Client ¶
type Client struct {
BaseURL string
// contains filtered or unexported fields
}
func (*Client) GetCatalog ¶
func (c *Client) GetCatalog() (*[]CatalogPageItems, error)
type LastReply ¶
type LastReply struct {
No int `json:"no"`
Now string `json:"now"`
Name string `json:"name"`
Com string `json:"com"`
Time int `json:"time"`
Resto int `json:"resto"`
ID string `json:"id"`
Filename string `json:"filename,omitempty"`
Ext string `json:"ext,omitempty"`
W int `json:"w,omitempty"`
H int `json:"h,omitempty"`
TnW int `json:"tn_w,omitempty"`
TnH int `json:"tn_h,omitempty"`
Tim int64 `json:"tim,omitempty"`
Md5 string `json:"md5,omitempty"`
Fsize int `json:"fsize,omitempty"`
}
type Thread ¶
type Thread struct {
Id int `csv:"id"`
Timestamp int `csv:"timestamp"`
Subject string `csv:"subject"`
Author string `csv:"author"`
Content string `csv:"content"`
Replies int `csv:"replies"`
Images int `csv:"images"`
LastReplyId int `csv:"last_reply_id"`
LastReplyTimestamp int `csv:"last_reply_time"`
LastReplyAuthor string `csv:"last_reply_author"`
LastReplyContent string `csv:"last_reply"`
}
func APIThreadToCSVThreads ¶
func GetLatestThreads ¶
Click to show internal directories.
Click to hide internal directories.