Documentation
¶
Index ¶
- Variables
- func LoadSubscriptions()
- func ParseThread(baseURL string, threadID int, mentionID int) (*threadInfo, error)
- func RefreshSubscription(delay time.Duration, notifications chan *Notification, sub ...*Subscription)
- func RefreshSubscriptions(delay time.Duration, notifications chan *Notification)
- func Subscribe(s *Subscription)
- func Summarize(notifications []*Notification) string
- func Unsubscribe(s *Subscription)
- type Notification
- type NotificationType
- type Post
- type Subscription
Constants ¶
This section is empty.
Variables ¶
View Source
var CacheDir string
View Source
var Version = "0.0.0"
Functions ¶
func LoadSubscriptions ¶
func LoadSubscriptions()
func ParseThread ¶
func RefreshSubscription ¶
func RefreshSubscription(delay time.Duration, notifications chan *Notification, sub ...*Subscription)
func RefreshSubscriptions ¶
func RefreshSubscriptions(delay time.Duration, notifications chan *Notification)
func Subscribe ¶
func Subscribe(s *Subscription)
func Summarize ¶
func Summarize(notifications []*Notification) string
func Unsubscribe ¶
func Unsubscribe(s *Subscription)
Types ¶
type Notification ¶
type Notification struct {
Type NotificationType
Sub *Subscription
Thread int
Post int
Mod bool
}
type NotificationType ¶
type NotificationType int
const ( TypeThread NotificationType = 0 TypeReply NotificationType = 1 TypeMention NotificationType = 2 )
type Post ¶
type Post struct {
ID int
Parent int
Timestamp int64
Bumped int64
IP string
Name string
Tripcode string
Email string
NameBlock string
Subject string
Message string
Password string
File string
FileMIME string
FileHash string
FileOriginal string
FileSize int64
FileWidth int
FileHeight int
Thumb string
ThumbWidth int
ThumbHeight int
Stickied bool
Locked bool
}
type Subscription ¶
type Subscription struct {
Website string
Thread int
Post int
Last int // Last post ID to mention the subscribed post, or last post in thread.
Mention bool
Note string
Checked time.Time
Updated time.Time
Status int
}
func ParseURL ¶
func ParseURL(u string) (*Subscription, error)
func Subscriptions ¶
func Subscriptions() []*Subscription
func (*Subscription) SetNote ¶ added in v1.0.6
func (s *Subscription) SetNote(note string)
func (*Subscription) URL ¶
func (s *Subscription) URL(postID int) string
Click to show internal directories.
Click to hide internal directories.