Documentation ¶
Index ¶
- type Children
- type Client
- func (rc *Client) GetCommentsBySubmissionId(submissionId string, limit int) ([]SubmissionComment, error)
- func (rc *Client) GetNewSubmissions(subreddit string, limit int) ([]Submission, error)
- func (rc *Client) GetUserNewestComments(limit int) ([]UserComment, error)
- func (rc *Client) IsCommentedByUser(submissionId string, author string) bool
- func (rc *Client) RefreshToken() error
- func (rc *Client) SubmitComment(postId, text string) error
- type Listing
- type ListingData
- type Submission
- type SubmissionComment
- type UserComment
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewRedditClient ¶
func (*Client) GetCommentsBySubmissionId ¶
func (rc *Client) GetCommentsBySubmissionId(submissionId string, limit int) ([]SubmissionComment, error)
func (*Client) GetNewSubmissions ¶
func (rc *Client) GetNewSubmissions(subreddit string, limit int) ([]Submission, error)
func (*Client) GetUserNewestComments ¶
func (rc *Client) GetUserNewestComments(limit int) ([]UserComment, error)
func (*Client) IsCommentedByUser ¶
func (*Client) RefreshToken ¶
func (*Client) SubmitComment ¶
type Listing ¶
type Listing[T any] struct { Kind string `json:"kind"` Data ListingData[T] `json:"data"` }
type ListingData ¶
type Submission ¶
type SubmissionComment ¶
type SubmissionComment struct { SubredditID string `json:"subreddit_id"` Subreddit string `json:"subreddit"` ID string `json:"id"` Author string `json:"author"` ParentID string `json:"parent_id"` AuthorFullname string `json:"author_fullname"` Body string `json:"body"` Name string `json:"name"` IsSubmitter bool `json:"is_submitter"` }
type UserComment ¶
type UserComment struct { SubredditID string `json:"subreddit_id"` Subreddit string `json:"subreddit"` ID string `json:"id"` Author string `json:"author"` ParentID string `json:"parent_id"` AuthorFullname string `json:"author_fullname"` Body string `json:"body"` LinkID string `json:"link_id"` Name string `json:"name"` }
Click to show internal directories.
Click to hide internal directories.