Documentation
¶
Index ¶
Constants ¶
View Source
const DELAY_S = 2 * time.Second
View Source
const REDDIT_HTTPS_URL = "https://ssl.reddit.com"
View Source
const REDDIT_URL = "http://www.reddit.com"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
UserAgent string
// contains filtered or unexported fields
}
Client represents a custom Reddit client that respects the Reddit API rate limit guidelines
func (*Client) GetComments ¶
Get comments for a specific thing ID TODO: implement sorting
func (*Client) GetSubreddit ¶
Get posts in a subreddit TODO: implement sorting
type Comment ¶
type Comment struct {
Kind string
Data struct {
Votable
Created
Author string
Body string
Body_html string
Id string
Name string
Permalink string
Replies json.RawMessage
Score int
Title string
}
}
A comment
func GetCommentsFlat ¶
Returns a flattened list of comments and replies
func (*Comment) GetReplies ¶
type CommentListing ¶
type CommentListing struct {
Data struct {
Modhash string
Children []Comment
After string
Before string
}
Kind string
}
A listing of comments
type Link ¶
type Link struct {
Kind string
Data struct {
Votable
Created
Domain string
Hidden bool
Id string
Is_self bool
Name string
Num_comments int
Over_18 bool
Permalink string
Score int
Title string
}
}
A link
Click to show internal directories.
Click to hide internal directories.