Documentation
¶
Index ¶
Constants ¶
View Source
const CommentApiPoint = "https://api.reddit.com/api/info/?id=t1_"
CommentApiPoint is the endpoint format which we should get info about comments
View Source
const PostApiPoint = "https://api.reddit.com/api/info/?id=t3_"
PostApiPoint is the endpoint format which we should get info about posts
View Source
const UserAgent = "TelegramBot:Reddit-Downloader-Bot:" + config.Version + " (by /u/HirbodBehnam)"
UserAgent of requests
Variables ¶
View Source
var RateLimitError = errors.New("rate limit reached")
Functions ¶
This section is empty.
Types ¶
type RedditOauth ¶
type RedditOauth struct {
// contains filtered or unexported fields
}
RedditOauth is an struct which can talk to reddit endpoints
func NewRedditOauth ¶
func NewRedditOauth(clientId, clientSecret string) (*RedditOauth, error)
NewRedditOauth returns a new RedditOauth to be used to get posts from reddit
func (*RedditOauth) GetComment ¶
func (r *RedditOauth) GetComment(id string) (map[string]interface{}, error)
GetComment gets the info about a comment from reddit
Click to show internal directories.
Click to hide internal directories.