Versions in this module Expand all Collapse all v0 v0.2.0 Oct 28, 2019 Changes in this version + const GrantTypePassword + const HTTP + const HTTPS + const OauthEndpointComposeMessage + const OauthEndpointMe + const OauthEndpointRequestContestMode + const OauthEndpointRequestRemovePost + const OauthEndpointRequestSticky + const OauthEndpointSetStylesheet + const OauthEndpointStylesheet + const OauthEndpointStylesheetTemplate + const OauthEndpointSubmitPost + const RedditEndpointLogin + func GetOauthURL(endpoint string, formats ...interface{}) *url.URL + func GetRedditURL(endpoint string, formats ...interface{}) *url.URL + type BaseJSONResponse struct + JSON map[string][][]string + Message string + func (r *BaseJSONResponse) Error() error + type BaseResponse struct + Err int64 + Message string + func (r *BaseResponse) Error() error + type CommentResponse struct + Approved bool + Archived bool + Author string + AuthorName string + Body string + ContestMode bool + CreatedUTC FloatTime + Downvotes int64 + Edited FloatTime + GildCount int + Locked bool + Name string + ParentID string + Removed bool + Replies []*CommentResponse + RepliesListing json.RawMessage + Saved bool + Score int64 + Spoiler bool + Stickied bool + Subreddit string + SubredditName string + SubredditType string + Upvotes int64 + func (parentComment *CommentResponse) DecodeReplies() error + type CommentsByScore []CommentResponse + func (a CommentsByScore) Len() int + func (a CommentsByScore) Less(i, j int) bool + func (a CommentsByScore) Swap(i, j int) + type CommentsByScoreDescending CommentsByScore + func (a CommentsByScoreDescending) Len() int + func (a CommentsByScoreDescending) Less(i, j int) bool + func (a CommentsByScoreDescending) Swap(i, j int) + type ComposeMessageResponse struct + type FloatTime time.Time + func (ft *FloatTime) UnmarshalJSON(data []byte) error + type MeResponse struct + CommentKarma int + Created FloatTime + CreatedUTC FloatTime + HasGold bool + HasMail bool + HasModMail bool + HasVerifiedEmail bool + ID string + IsMod bool + LinkKarma int + Over18 bool + Username string + type PostResponse struct + Approved bool + Archived bool + Author string + AuthorName string + Body string + CommentCount int64 + ContestMode bool + CreatedUTC FloatTime + Downvotes int64 + Edited FloatTime + GildCount int + Hidden bool + ID string + IsSelf bool + Locked bool + NSFW bool + Name string + Quarantined bool + Removed bool + Replies []CommentResponse + Saved bool + Score int64 + Spoiler bool + Stickied bool + Subreddit string + SubredditName string + SubredditType string + URL string + Upvotes int64 + type RedditAPI struct + Account *RedditAccount + Client http.Client + ClientID string + DebugMode bool + UserAgent string + func NewRedditAPI(clientID, clientSecret, userAgent, username string, debugMode bool) *RedditAPI + func (api *RedditAPI) ComposeMessage(to, subject, text string) error + func (api *RedditAPI) Get(u *url.URL, query url.Values) (*http.Response, error) + func (api *RedditAPI) NewRequest(method string, u *url.URL, body io.Reader) (*http.Request, error) + func (api *RedditAPI) PostForm(u *url.URL, data url.Values) (*http.Response, error) + func (api *RedditAPI) RequestContestMode(name string, state bool) error + func (api *RedditAPI) RequestMe() (*MeResponse, error) + func (api *RedditAPI) RequestPostJSON(u *url.URL) (*PostResponse, error) + func (api *RedditAPI) RequestRemovePost(name string, spam bool) error + func (api *RedditAPI) RequestSetStylesheet(subreddit, stylesheet, reason string) (*SetStylesheetResponse, error) + func (api *RedditAPI) RequestSticky(subreddit string, name string, state bool, num int) error + func (api *RedditAPI) RequestStylesheet(subreddit string) (string, error) + func (api *RedditAPI) RequestStylesheetTemplate(subreddit string) (*StylesheetTemplateData, error) + func (api *RedditAPI) RequestSubmitTextPost(subreddit, title, text string, ad, nsfw, spoiler, sendReplies bool) (*SubmitPostData, error) + type RedditAccount struct + API *RedditAPI + Token *Token + Username string + func (a *RedditAccount) PasswordLogin(password string) error + type SetStylesheetResponse struct + type StylesheetTemplateData struct + Images []StylesheetTemplateImage + Stylesheet string + type StylesheetTemplateImage struct + Link string + Name string + URL string + type SubmitPostData struct + Drafts int + ID string + Name string + URL string + type Token struct + Error string + ExpiresIn TokenExpiresIn + Expiry time.Time + Scope string + Token string + TokenType string + type TokenExpiresIn time.Duration + func (t *TokenExpiresIn) UnmarshalJSON(data []byte) error