Versions in this module Expand all Collapse all v1 v1.0.0 Aug 26, 2020 Changes in this version + func Bool(v bool) *bool + func CheckResponse(r *http.Response) error + func DoRequest(ctx context.Context, req *http.Request) (*http.Response, error) + func DoRequestWithClient(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) + func FromEnv(c *Client) error + func Int(v int) *int + func StreamDiscardInitial(c *streamConfig) + func String(v string) *string + type APIError struct + Field string + Label string + Reason string + func (e *APIError) Error() string + func (e *APIError) UnmarshalJSON(data []byte) error + type AccountService struct + func (s *AccountService) AddTrusted(ctx context.Context, username string) (*Response, error) + func (s *AccountService) Blocked(ctx context.Context) ([]Relationship, *Response, error) + func (s *AccountService) Friends(ctx context.Context) ([]Relationship, *Response, error) + func (s *AccountService) Info(ctx context.Context) (*User, *Response, error) + func (s *AccountService) Karma(ctx context.Context) ([]SubredditKarma, *Response, error) + func (s *AccountService) Messaging(ctx context.Context) ([]Relationship, []Relationship, *Response, error) + func (s *AccountService) RemoveTrusted(ctx context.Context, username string) (*Response, error) + func (s *AccountService) Settings(ctx context.Context) (*Settings, *Response, error) + func (s *AccountService) Trophies(ctx context.Context) ([]Trophy, *Response, error) + func (s *AccountService) Trusted(ctx context.Context) ([]Relationship, *Response, error) + func (s *AccountService) UpdateSettings(ctx context.Context, settings *Settings) (*Settings, *Response, error) + type Ban struct + DaysLeft *int + Note string + type BanConfig struct + Days *int + Message string + ModNote string + Reason string + type Bans struct + After string + Bans []*Ban + Before string + type Blocked struct + Blocked string + BlockedID string + Created *Timestamp + type Client struct + Account *AccountService + BaseURL *url.URL + Collection *CollectionService + Comment *CommentService + Emoji *EmojiService + Flair *FlairService + Gold *GoldService + ID string + Listings *ListingsService + Message *MessageService + Moderation *ModerationService + Multi *MultiService + Password string + Post *PostService + Secret string + Stream *StreamService + Subreddit *SubredditService + TokenURL *url.URL + User *UserService + Username string + func NewClient(httpClient *http.Client, creds *Credentials, opts ...Opt) (*Client, error) + func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Response, error) + func (c *Client) NewRequest(method string, path string, body interface{}) (*http.Request, error) + func (c *Client) NewRequestWithForm(method string, path string, form url.Values) (*http.Request, error) + func (c *Client) OnRequestCompleted(rc RequestCompletionCallback) + func (c *Client) UserAgent() string + type Collection struct + Author string + AuthorID string + Created *Timestamp + Description string + ID string + Layout string + Permalink string + PostIDs []string + PrimaryPostID string + SubredditID string + Title string + Updated *Timestamp + type CollectionCreateRequest struct + Description string + Layout string + SubredditID string + Title string + type CollectionService struct + func (s *CollectionService) AddPost(ctx context.Context, postID, collectionID string) (*Response, error) + func (s *CollectionService) Create(ctx context.Context, createRequest *CollectionCreateRequest) (*Collection, *Response, error) + func (s *CollectionService) Delete(ctx context.Context, id string) (*Response, error) + func (s *CollectionService) Follow(ctx context.Context, id string) (*Response, error) + func (s *CollectionService) FromSubreddit(ctx context.Context, id string) ([]*Collection, *Response, error) + func (s *CollectionService) Get(ctx context.Context, id string) (*Collection, *Response, error) + func (s *CollectionService) RemovePost(ctx context.Context, postID, collectionID string) (*Response, error) + func (s *CollectionService) ReorderPosts(ctx context.Context, collectionID string, postIDs ...string) (*Response, error) + func (s *CollectionService) Unfollow(ctx context.Context, id string) (*Response, error) + func (s *CollectionService) UpdateDescription(ctx context.Context, id string, description string) (*Response, error) + func (s *CollectionService) UpdateLayoutGallery(ctx context.Context, id string) (*Response, error) + func (s *CollectionService) UpdateLayoutTimeline(ctx context.Context, id string) (*Response, error) + func (s *CollectionService) UpdateTitle(ctx context.Context, id string, title string) (*Response, error) + type Comment struct + Author string + AuthorFlairID string + AuthorFlairText string + AuthorID string + Body string + CanGild bool + Controversiality int + Created *Timestamp + Edited *Timestamp + FullID string + ID string + IsSubmitter bool + Likes *bool + Locked bool + NSFW bool + ParentID string + Permalink string + PostAuthor string + PostID string + PostNumComments *int + PostPermalink string + PostTitle string + Replies Replies + Saved bool + Score int + ScoreHidden bool + Stickied bool + SubredditID string + SubredditName string + SubredditNamePrefixed string + func (c *Comment) HasMore() bool + type CommentService struct + func (s *CommentService) Edit(ctx context.Context, id string, text string) (*Comment, *Response, error) + func (s *CommentService) LoadMoreReplies(ctx context.Context, comment *Comment) (*Response, error) + func (s *CommentService) Submit(ctx context.Context, parentID string, text string) (*Comment, *Response, error) + func (s CommentService) Delete(ctx context.Context, id string) (*Response, error) + func (s CommentService) DisableReplies(ctx context.Context, id string) (*Response, error) + func (s CommentService) Downvote(ctx context.Context, id string) (*Response, error) + func (s CommentService) EnableReplies(ctx context.Context, id string) (*Response, error) + func (s CommentService) Lock(ctx context.Context, id string) (*Response, error) + func (s CommentService) RemoveVote(ctx context.Context, id string) (*Response, error) + func (s CommentService) Report(ctx context.Context, id string, reason string) (*Response, error) + func (s CommentService) Save(ctx context.Context, id string) (*Response, error) + func (s CommentService) Unlock(ctx context.Context, id string) (*Response, error) + func (s CommentService) Unsave(ctx context.Context, id string) (*Response, error) + func (s CommentService) Upvote(ctx context.Context, id string) (*Response, error) + type Comments struct + After string + Before string + Comments []*Comment + type Credentials struct + ID string + Password string + Secret string + Username string + type Emoji struct + CreatedBy string + ModFlairOnly bool + Name string + PostFlairAllowed bool + URL string + UserFlairAllowed bool + type EmojiCreateOrUpdateRequest struct + ModFlairOnly *bool + Name string + PostFlairAllowed *bool + UserFlairAllowed *bool + type EmojiService struct + func (s *EmojiService) Delete(ctx context.Context, subreddit string, emoji string) (*Response, error) + func (s *EmojiService) DisableCustomSize(ctx context.Context, subreddit string) (*Response, error) + func (s *EmojiService) Get(ctx context.Context, subreddit string) ([]*Emoji, []*Emoji, *Response, error) + func (s *EmojiService) SetSize(ctx context.Context, subreddit string, height, width int) (*Response, error) + func (s *EmojiService) Update(ctx context.Context, subreddit string, ...) (*Response, error) + func (s *EmojiService) Upload(ctx context.Context, subreddit string, ...) (*Response, error) + type ErrorResponse struct + Message string + Response *http.Response + func (r *ErrorResponse) Error() string + type Flair struct + BackgroundColor string + CSSClass string + Color string + Editable bool + ID string + ModOnly bool + Text string + Type string + type FlairService struct + func (s *FlairService) GetPostFlairs(ctx context.Context, subreddit string) ([]*Flair, *Response, error) + func (s *FlairService) GetUserFlairs(ctx context.Context, subreddit string) ([]*Flair, *Response, error) + func (s *FlairService) ListUserFlairs(ctx context.Context, subreddit string) ([]*FlairSummary, *Response, error) + type FlairSummary struct + CSSClass string + Text string + User string + type GoldService struct + func (s *GoldService) Gild(ctx context.Context, id string) (*Response, error) + func (s *GoldService) Give(ctx context.Context, username string, months int) (*Response, error) + type JSONErrorResponse struct + JSON struct{ ... } + Response *http.Response + func (r *JSONErrorResponse) Error() string + type ListDuplicatePostOptions struct + CrosspostsOnly bool + Sort string + Subreddit string + type ListModActionOptions struct + Moderator string + Type string + type ListOptions struct + After string + Before string + Limit int + type ListPostOptions struct + Time string + type ListPostSearchOptions struct + Sort string + type ListSubredditOptions struct + Sort string + type ListUserOverviewOptions struct + Sort string + Time string + type ListingsService struct + func (s *ListingsService) Get(ctx context.Context, ids ...string) ([]*Post, []*Comment, []*Subreddit, *Response, error) + func (s *ListingsService) GetPosts(ctx context.Context, ids ...string) ([]*Post, *Response, error) + type Message struct + Author string + Created *Timestamp + FullID string + ID string + IsComment bool + ParentID string + Subject string + Text string + To string + type MessageService struct + func (s *MessageService) Block(ctx context.Context, id string) (*Response, error) + func (s *MessageService) Collapse(ctx context.Context, ids ...string) (*Response, error) + func (s *MessageService) Delete(ctx context.Context, id string) (*Response, error) + func (s *MessageService) Inbox(ctx context.Context, opts *ListOptions) (*Messages, *Messages, *Response, error) + func (s *MessageService) InboxUnread(ctx context.Context, opts *ListOptions) (*Messages, *Messages, *Response, error) + func (s *MessageService) Read(ctx context.Context, ids ...string) (*Response, error) + func (s *MessageService) ReadAll(ctx context.Context) (*Response, error) + func (s *MessageService) Send(ctx context.Context, sendRequest *SendMessageRequest) (*Response, error) + func (s *MessageService) Sent(ctx context.Context, opts *ListOptions) (*Messages, *Response, error) + func (s *MessageService) Uncollapse(ctx context.Context, ids ...string) (*Response, error) + func (s *MessageService) Unread(ctx context.Context, ids ...string) (*Response, error) + type Messages struct + After string + Before string + Messages []*Message + type ModAction struct + Action string + Created *Timestamp + ID string + Moderator string + ModeratorID string + Subreddit string + SubredditID string + TargetAuthor string + TargetBody string + TargetID string + TargetPermalink string + TargetTitle string + type ModActions struct + After string + Before string + ModActions []*ModAction + type ModPermissions struct + Access bool + All bool + ChatConfig bool + ChatOperator bool + Config bool + Flair bool + Mail bool + Posts bool + Wiki bool + func (p *ModPermissions) String() (s string) + type ModerationService struct + func (s *ModerationService) AcceptInvite(ctx context.Context, subreddit string) (*Response, error) + func (s *ModerationService) Approve(ctx context.Context, id string) (*Response, error) + func (s *ModerationService) ApproveUser(ctx context.Context, subreddit string, username string) (*Response, error) + func (s *ModerationService) ApproveUserWiki(ctx context.Context, subreddit string, username string) (*Response, error) + func (s *ModerationService) Ban(ctx context.Context, subreddit string, username string, config *BanConfig) (*Response, error) + func (s *ModerationService) BanWiki(ctx context.Context, subreddit string, username string, config *BanConfig) (*Response, error) + func (s *ModerationService) Edited(ctx context.Context, subreddit string, opts *ListOptions) (*Posts, *Comments, *Response, error) + func (s *ModerationService) GetActions(ctx context.Context, subreddit string, opts *ListModActionOptions) (*ModActions, *Response, error) + func (s *ModerationService) IgnoreReports(ctx context.Context, id string) (*Response, error) + func (s *ModerationService) Invite(ctx context.Context, subreddit string, username string, ...) (*Response, error) + func (s *ModerationService) Leave(ctx context.Context, subredditID string) (*Response, error) + func (s *ModerationService) LeaveContributor(ctx context.Context, subredditID string) (*Response, error) + func (s *ModerationService) Mute(ctx context.Context, subreddit string, username string) (*Response, error) + func (s *ModerationService) Remove(ctx context.Context, id string) (*Response, error) + func (s *ModerationService) RemoveSpam(ctx context.Context, id string) (*Response, error) + func (s *ModerationService) SetPermissions(ctx context.Context, subreddit string, username string, ...) (*Response, error) + func (s *ModerationService) UnapproveUser(ctx context.Context, subreddit string, username string) (*Response, error) + func (s *ModerationService) UnapproveUserWiki(ctx context.Context, subreddit string, username string) (*Response, error) + func (s *ModerationService) Unban(ctx context.Context, subreddit string, username string) (*Response, error) + func (s *ModerationService) UnbanWiki(ctx context.Context, subreddit string, username string) (*Response, error) + func (s *ModerationService) UnignoreReports(ctx context.Context, id string) (*Response, error) + func (s *ModerationService) Uninvite(ctx context.Context, subreddit string, username string) (*Response, error) + func (s *ModerationService) Unmute(ctx context.Context, subreddit string, username string) (*Response, error) + type Moderator struct + Permissions []string + type More struct + Children []string + Count int + Depth int + FullID string + ID string + ParentID string + type Multi struct + CanEdit bool + CopiedFrom *string + Created *Timestamp + Description string + DisplayName string + Favorite bool + NSFW bool + Name string + NumberOfSubscribers int + Owner string + OwnerID string + Path string + Subreddits SubredditNames + Subscribed bool + Visibility string + type MultiCopyRequest struct + Description string + DisplayName string + FromPath string + ToPath string + type MultiCreateOrUpdateRequest struct + Description string + Name string + Subreddits SubredditNames + Visibility string + func (r *MultiCreateOrUpdateRequest) Form() url.Values + type MultiService struct + func (s *MultiService) AddSubreddit(ctx context.Context, multiPath string, subreddit string) (*Response, error) + func (s *MultiService) Copy(ctx context.Context, copyRequest *MultiCopyRequest) (*Multi, *Response, error) + func (s *MultiService) Create(ctx context.Context, createRequest *MultiCreateOrUpdateRequest) (*Multi, *Response, error) + func (s *MultiService) Delete(ctx context.Context, multiPath string) (*Response, error) + func (s *MultiService) DeleteSubreddit(ctx context.Context, multiPath string, subreddit string) (*Response, error) + func (s *MultiService) Get(ctx context.Context, multiPath string) (*Multi, *Response, error) + func (s *MultiService) GetDescription(ctx context.Context, multiPath string) (string, *Response, error) + func (s *MultiService) Mine(ctx context.Context) ([]Multi, *Response, error) + func (s *MultiService) Of(ctx context.Context, username string) ([]Multi, *Response, error) + func (s *MultiService) Update(ctx context.Context, multiPath string, ...) (*Multi, *Response, error) + func (s *MultiService) UpdateDescription(ctx context.Context, multiPath string, description string) (string, *Response, error) + type Opt func(*Client) error + func WithBaseURL(u string) Opt + func WithTokenURL(u string) Opt + type Post struct + Author string + AuthorID string + Body string + Created *Timestamp + Edited *Timestamp + FullID string + ID string + IsSelfPost bool + Likes *bool + Locked bool + NSFW bool + NumberOfComments int + Permalink string + Saved bool + Score int + Spoiler bool + Stickied bool + SubredditID string + SubredditName string + SubredditNamePrefixed string + Title string + URL string + UpvoteRatio float32 + type PostAndComments struct + Comments []*Comment + More *More + Post *Post + func (pc *PostAndComments) HasMore() bool + func (pc *PostAndComments) UnmarshalJSON(data []byte) error + type PostService struct + func (s *PostService) ClearSuggestedSort(ctx context.Context, id string) (*Response, error) + func (s *PostService) DisableContestMode(ctx context.Context, id string) (*Response, error) + func (s *PostService) Duplicates(ctx context.Context, id string, opts *ListDuplicatePostOptions) (*Post, *Posts, *Response, error) + func (s *PostService) Edit(ctx context.Context, id string, text string) (*Post, *Response, error) + func (s *PostService) EnableContestMode(ctx context.Context, id string) (*Response, error) + func (s *PostService) Get(ctx context.Context, id string) (*PostAndComments, *Response, error) + func (s *PostService) Hide(ctx context.Context, ids ...string) (*Response, error) + func (s *PostService) LoadMoreComments(ctx context.Context, pc *PostAndComments) (*Response, error) + func (s *PostService) MarkNSFW(ctx context.Context, id string) (*Response, error) + func (s *PostService) MarkVisited(ctx context.Context, ids ...string) (*Response, error) + func (s *PostService) PinToProfile(ctx context.Context, id string) (*Response, error) + func (s *PostService) Random(ctx context.Context) (*PostAndComments, *Response, error) + func (s *PostService) RandomFromSubreddits(ctx context.Context, subreddits ...string) (*PostAndComments, *Response, error) + func (s *PostService) RandomFromSubscriptions(ctx context.Context) (*PostAndComments, *Response, error) + func (s *PostService) SetSuggestedSortAMA(ctx context.Context, id string) (*Response, error) + func (s *PostService) SetSuggestedSortBest(ctx context.Context, id string) (*Response, error) + func (s *PostService) SetSuggestedSortControversial(ctx context.Context, id string) (*Response, error) + func (s *PostService) SetSuggestedSortLive(ctx context.Context, id string) (*Response, error) + func (s *PostService) SetSuggestedSortNew(ctx context.Context, id string) (*Response, error) + func (s *PostService) SetSuggestedSortOld(ctx context.Context, id string) (*Response, error) + func (s *PostService) SetSuggestedSortRandom(ctx context.Context, id string) (*Response, error) + func (s *PostService) SetSuggestedSortTop(ctx context.Context, id string) (*Response, error) + func (s *PostService) Spoiler(ctx context.Context, id string) (*Response, error) + func (s *PostService) Sticky(ctx context.Context, id string, bottom bool) (*Response, error) + func (s *PostService) SubmitLink(ctx context.Context, opts SubmitLinkOptions) (*Submitted, *Response, error) + func (s *PostService) SubmitText(ctx context.Context, opts SubmitTextOptions) (*Submitted, *Response, error) + func (s *PostService) Unhide(ctx context.Context, ids ...string) (*Response, error) + func (s *PostService) UnmarkNSFW(ctx context.Context, id string) (*Response, error) + func (s *PostService) UnpinFromProfile(ctx context.Context, id string) (*Response, error) + func (s *PostService) Unspoiler(ctx context.Context, id string) (*Response, error) + func (s *PostService) Unsticky(ctx context.Context, id string) (*Response, error) + func (s PostService) Delete(ctx context.Context, id string) (*Response, error) + func (s PostService) DisableReplies(ctx context.Context, id string) (*Response, error) + func (s PostService) Downvote(ctx context.Context, id string) (*Response, error) + func (s PostService) EnableReplies(ctx context.Context, id string) (*Response, error) + func (s PostService) Lock(ctx context.Context, id string) (*Response, error) + func (s PostService) RemoveVote(ctx context.Context, id string) (*Response, error) + func (s PostService) Report(ctx context.Context, id string, reason string) (*Response, error) + func (s PostService) Save(ctx context.Context, id string) (*Response, error) + func (s PostService) Unlock(ctx context.Context, id string) (*Response, error) + func (s PostService) Unsave(ctx context.Context, id string) (*Response, error) + func (s PostService) Upvote(ctx context.Context, id string) (*Response, error) + type Posts struct + After string + Before string + Posts []*Post + type Relationship struct + Created *Timestamp + ID string + User string + UserID string + type Relationships struct + After string + Before string + Relationships []*Relationship + type Replies struct + Comments []*Comment + More *More + func (r *Replies) MarshalJSON() ([]byte, error) + func (r *Replies) UnmarshalJSON(data []byte) error + type RequestCompletionCallback func(*http.Request, *http.Response) + type Response struct + type SendMessageRequest struct + FromSubreddit string + Subject string + Text string + To string + type Settings struct + AcceptPrivateMessages *string + ActivityRelevantAds *bool + AllowClickTracking *bool + AllowResearch *bool + AllowThirdPartyDataAdPersonalization *bool + AllowThirdPartySiteDataAdPersonalization *bool + AllowThirdPartySiteDataContentPersonalization *bool + AutoExpandMedia *string + Beta *bool + CollapseReadMessages *bool + Compress *bool + CredditAutorenew *bool + DarkMode *bool + DefaultCommentSort *string + DisableCustomThemes *bool + DisableProfanity *bool + EnableMentionNotifications *bool + EnableNotifications *bool + EnablePrivateRSSFeeds *bool + EnableThreadedMessages *bool + EnableThreadedModmail *bool + EnableVideoAutoplay *bool + HideAds *bool + HideDownvotedPosts *bool + HideFromSearchEngines *bool + HideUpvotedPosts *bool + HighlightControversialComments *bool + HighlightNewComments *bool + IgnoreSuggestedSorts *bool + IncludeNSFWSearchResults *bool + LabelNSFW *bool + Language *string + Location *string + MarkMessagesAsRead *bool + MinimumCommentScore *int + MinimumPostScore *int + NumberOfComments *int + NumberOfPosts *int + OpenLinksInNewWindow *bool + ProfileOptOut *bool + PublicizeVotes *bool + ReceiveCrosspostMessages *bool + ReceiveWelcomeMessages *bool + SendEmailDigests *bool + SendMessagesAsEmails *bool + ShowCustomSubredditThemes *bool + ShowDomainDetails *bool + ShowGoldExpiration *bool + ShowLocationBasedRecommendations *bool + ShowNSFW *bool + ShowOldSearchPage *bool + ShowPostFlair *bool + ShowPromote *bool + ShowRecentlyViewedPosts *bool + ShowSpotlightBox *bool + ShowThumbnails *string + ShowTrendingSubreddits *bool + ShowTwitter *bool + ShowUserFlair *bool + StoreVisits *bool + SubredditTheme *string + ThemeSelector *string + TopKarmaSubreddits *bool + UnsubscribeFromAllEmails *bool + UseGlobalDefaults *bool + UseNewReddit *bool + UsesNewReddit *bool + type StreamOpt func(*streamConfig) + func StreamInterval(v time.Duration) StreamOpt + func StreamMaxRequests(v int) StreamOpt + type StreamService struct + func (s *StreamService) Posts(subreddit string, opts ...StreamOpt) (<-chan *Post, <-chan error, func()) + type SubmitLinkOptions struct + FlairID string + FlairText string + NSFW bool + Resubmit bool + SendReplies *bool + Spoiler bool + Subreddit string + Title string + URL string + type SubmitTextOptions struct + FlairID string + FlairText string + NSFW bool + SendReplies *bool + Spoiler bool + Subreddit string + Text string + Title string + type Submitted struct + FullID string + ID string + URL string + type Subreddit struct + ActiveUserCount *int + Created *Timestamp + Description string + Favorite bool + FullID string + ID string + NSFW bool + Name string + NamePrefixed string + Subscribed bool + Subscribers int + SuggestedCommentSort string + Title string + Type string + URL string + UserIsMod bool + type SubredditKarma struct + CommentKarma int + PostKarma int + Subreddit string + type SubredditNames []string + func (n *SubredditNames) MarshalJSON() ([]byte, error) + func (n *SubredditNames) UnmarshalJSON(data []byte) error + type SubredditService struct + func (s *SubredditService) Approved(ctx context.Context, opts *ListSubredditOptions) (*Subreddits, *Response, error) + func (s *SubredditService) Banned(ctx context.Context, subreddit string, opts *ListOptions) (*Bans, *Response, error) + func (s *SubredditService) Contributors(ctx context.Context, subreddit string, opts *ListOptions) (*Relationships, *Response, error) + func (s *SubredditService) ControversialPosts(ctx context.Context, subreddit string, opts *ListPostOptions) (*Posts, *Response, error) + func (s *SubredditService) Default(ctx context.Context, opts *ListSubredditOptions) (*Subreddits, *Response, error) + func (s *SubredditService) Favorite(ctx context.Context, subreddit string) (*Response, error) + func (s *SubredditService) Get(ctx context.Context, name string) (*Subreddit, *Response, error) + func (s *SubredditService) GetSticky1(ctx context.Context, subreddit string) (*PostAndComments, *Response, error) + func (s *SubredditService) GetSticky2(ctx context.Context, subreddit string) (*PostAndComments, *Response, error) + func (s *SubredditService) Gold(ctx context.Context, opts *ListSubredditOptions) (*Subreddits, *Response, error) + func (s *SubredditService) HotPosts(ctx context.Context, subreddit string, opts *ListOptions) (*Posts, *Response, error) + func (s *SubredditService) Moderated(ctx context.Context, opts *ListSubredditOptions) (*Subreddits, *Response, error) + func (s *SubredditService) Moderators(ctx context.Context, subreddit string) ([]*Moderator, *Response, error) + func (s *SubredditService) Muted(ctx context.Context, subreddit string, opts *ListOptions) (*Relationships, *Response, error) + func (s *SubredditService) New(ctx context.Context, opts *ListSubredditOptions) (*Subreddits, *Response, error) + func (s *SubredditService) NewPosts(ctx context.Context, subreddit string, opts *ListOptions) (*Posts, *Response, error) + func (s *SubredditService) Popular(ctx context.Context, opts *ListSubredditOptions) (*Subreddits, *Response, error) + func (s *SubredditService) Random(ctx context.Context) (*Subreddit, *Response, error) + func (s *SubredditService) RandomNSFW(ctx context.Context) (*Subreddit, *Response, error) + func (s *SubredditService) RisingPosts(ctx context.Context, subreddit string, opts *ListOptions) (*Posts, *Response, error) + func (s *SubredditService) Search(ctx context.Context, query string, opts *ListSubredditOptions) (*Subreddits, *Response, error) + func (s *SubredditService) SearchNames(ctx context.Context, query string) ([]string, *Response, error) + func (s *SubredditService) SearchPosts(ctx context.Context, query string, subreddit string, ...) (*Posts, *Response, error) + func (s *SubredditService) SubmissionText(ctx context.Context, name string) (string, *Response, error) + func (s *SubredditService) Subscribe(ctx context.Context, subreddits ...string) (*Response, error) + func (s *SubredditService) SubscribeByID(ctx context.Context, ids ...string) (*Response, error) + func (s *SubredditService) Subscribed(ctx context.Context, opts *ListSubredditOptions) (*Subreddits, *Response, error) + func (s *SubredditService) TopPosts(ctx context.Context, subreddit string, opts *ListPostOptions) (*Posts, *Response, error) + func (s *SubredditService) Unfavorite(ctx context.Context, subreddit string) (*Response, error) + func (s *SubredditService) Unsubscribe(ctx context.Context, subreddits ...string) (*Response, error) + func (s *SubredditService) UnsubscribeByID(ctx context.Context, ids ...string) (*Response, error) + func (s *SubredditService) WikiBanned(ctx context.Context, subreddit string, opts *ListOptions) (*Bans, *Response, error) + func (s *SubredditService) WikiContributors(ctx context.Context, subreddit string, opts *ListOptions) (*Relationships, *Response, error) + type Subreddits struct + After string + Before string + Subreddits []*Subreddit + type Timestamp struct + func (t *Timestamp) MarshalJSON() ([]byte, error) + func (t *Timestamp) UnmarshalJSON(data []byte) (err error) + func (t Timestamp) Before(u Timestamp) bool + func (t Timestamp) Equal(u Timestamp) bool + type Trophy struct + Description string + ID string + Name string + type User struct + CommentKarma int + Created *Timestamp + HasVerifiedEmail bool + ID string + IsEmployee bool + IsFriend bool + IsSuspended bool + NSFW bool + Name string + PostKarma int + type UserService struct + func (s *UserService) Block(ctx context.Context, username string) (*Blocked, *Response, error) + func (s *UserService) BlockByID(ctx context.Context, id string) (*Blocked, *Response, error) + func (s *UserService) Comments(ctx context.Context, opts *ListUserOverviewOptions) (*Comments, *Response, error) + func (s *UserService) CommentsOf(ctx context.Context, username string, opts *ListUserOverviewOptions) (*Comments, *Response, error) + func (s *UserService) Downvoted(ctx context.Context, opts *ListUserOverviewOptions) (*Posts, *Response, error) + func (s *UserService) DownvotedOf(ctx context.Context, username string, opts *ListUserOverviewOptions) (*Posts, *Response, error) + func (s *UserService) Friend(ctx context.Context, username string) (*Relationship, *Response, error) + func (s *UserService) Get(ctx context.Context, username string) (*User, *Response, error) + func (s *UserService) GetFriendship(ctx context.Context, username string) (*Relationship, *Response, error) + func (s *UserService) GetMultipleByID(ctx context.Context, ids ...string) (map[string]*UserSummary, *Response, error) + func (s *UserService) Gilded(ctx context.Context, opts *ListUserOverviewOptions) (*Posts, *Response, error) + func (s *UserService) Hidden(ctx context.Context, opts *ListUserOverviewOptions) (*Posts, *Response, error) + func (s *UserService) New(ctx context.Context, opts *ListUserOverviewOptions) (*Subreddits, *Response, error) + func (s *UserService) Overview(ctx context.Context, opts *ListUserOverviewOptions) (*Posts, *Comments, *Response, error) + func (s *UserService) OverviewOf(ctx context.Context, username string, opts *ListUserOverviewOptions) (*Posts, *Comments, *Response, error) + func (s *UserService) Popular(ctx context.Context, opts *ListOptions) (*Subreddits, *Response, error) + func (s *UserService) Posts(ctx context.Context, opts *ListUserOverviewOptions) (*Posts, *Response, error) + func (s *UserService) PostsOf(ctx context.Context, username string, opts *ListUserOverviewOptions) (*Posts, *Response, error) + func (s *UserService) Saved(ctx context.Context, opts *ListUserOverviewOptions) (*Posts, *Comments, *Response, error) + func (s *UserService) Search(ctx context.Context, query string, opts *ListOptions) (*Users, *Response, error) + func (s *UserService) Trophies(ctx context.Context) ([]Trophy, *Response, error) + func (s *UserService) TrophiesOf(ctx context.Context, username string) ([]Trophy, *Response, error) + func (s *UserService) Unblock(ctx context.Context, username string) (*Response, error) + func (s *UserService) UnblockByID(ctx context.Context, id string) (*Response, error) + func (s *UserService) Unfriend(ctx context.Context, username string) (*Response, error) + func (s *UserService) Upvoted(ctx context.Context, opts *ListUserOverviewOptions) (*Posts, *Response, error) + func (s *UserService) UpvotedOf(ctx context.Context, username string, opts *ListUserOverviewOptions) (*Posts, *Response, error) + func (s *UserService) UsernameAvailable(ctx context.Context, username string) (bool, *Response, error) + type UserSummary struct + CommentKarma int + Created *Timestamp + NSFW bool + Name string + PostKarma int + type Users struct + After string + Before string + Users []*User Other modules containing this package github.com/vartanbeno/go-reddit/v2