Documentation ¶
Index ¶
- type AwardSubType
- type AwardType
- type Comment
- type CommentChild
- type CommentListing
- type CommentListingData
- type CommentListingList
- type FlairRichtext
- type Gilding
- type Gildings
- type IconFormat
- type Image
- type MediaEmbed
- type PostListingChild
- type Preview
- type ResizedIcon
- type Submission
- type SubmissionListing
- type SubmissionListingData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comment ¶
type Comment struct { Body string `json:"body" cql:"body"` ID string `json:"id" cql:"id"` Name string `json:"name" cql:"name"` Subreddit string `json:"subreddit" cql:"subreddit"` SubredditID string `json:"subreddit_id" cql:"subreddit_id"` LinkID string `json:"link_id" cql:"link_id"` LinkTitle string `json:"link_title" cql:"link_title"` Likes int64 `json:"likes" cql:"likes"` Permalink string `json:"permalink" cql:"permalink"` Ups int64 `json:"ups" cql:"ups"` Downs int64 `json:"downs" cql:"downs"` Author string `json:"author" cql:"author"` AuthorFullname string `json:"author_fullname" cql:"author_fullname"` Replies string `json:"replies" cql:"replies"` ParentID string `json:"parent_id" cql:"parent_id"` Created float64 `json:"created" cql:"created"` CreatedUTC float64 `json:"created_utc" cql:"created_utc"` NumComments int64 `json:"num_comments" cql:"num_comments"` IsClassified bool `json:"is_classified" cql: "is_classified"` IsHatespeech bool `json:"is_hatespech" cql: "is_hatespech"` ProbaHateful float64 `json:"proba_hateful" cql:"proba_hateful"` ProbaNotHateful float64 `json:"proba_not_hateful" cql:"proba_not_hateful"` RemovedByCategory string `json:"removed_by_category"` }
Comment contains the info of a comment Not all data is stored
type CommentChild ¶
CommentChild ...
type CommentListing ¶
type CommentListing struct { Kind string `json:"kind"` Data CommentListingData `json:"data"` }
CommentListing if the list component
func (*CommentListing) UnwrapData ¶
func (p *CommentListing) UnwrapData() ([]Comment, error)
UnwrapData unwraps the nested children from a CommentListing and returns the children as a lit of Comment
type CommentListingData ¶
type CommentListingData struct { Modhash string `json:"modhash"` Dist float64 `json:"dist"` Children []CommentChild `json:"children"` After string `json:"after"` Before string `json:"before"` }
CommentListingData contains data of a CommentListing
type CommentListingList ¶
type CommentListingList []CommentListing
CommentListingList is the top object of the returned json
type FlairRichtext ¶
FlairRichtext ...
type Image ¶
type Image struct { Source ResizedIcon `json:"source"` Resolutions []ResizedIcon `json:"resolutions"` Variants MediaEmbed `json:"variants"` ID string `json:"id"` }
Image ...
type PostListingChild ¶
type PostListingChild struct { Kind string `json:"kind"` Data Submission `json:"data"` }
PostListingChild ...
type ResizedIcon ¶
type ResizedIcon struct { URL string `json:"url"` Width int64 `json:"width"` Height int64 `json:"height"` }
ResizedIcon ...
type Submission ¶
type Submission struct { Title string `json:"title" cql:"title"` ID string `json:"id" cql:"id"` Name string `json:"name" cql:"name"` Subreddit string `json:"subreddit" cql:"subreddit"` SubredditID string `json:"subreddit_id" cql:"subreddit_id"` Likes int64 `json:"likes" cql:"likes"` Permalink string `json:"permalink" cql:"permalink"` URL string `json:"url" cql:"url"` Ups int64 `json:"ups" cql:"ups"` Downs int64 `json:"downs" cql:"downs"` Author string `json:"author" cql:"author"` AuthorFullname string `json:"author_fullname" cql:"author_fullname"` Created float64 `json:"created" cql:"created"` CreatedUTC float64 `json:"created_utc" cql:"created_utc"` NumComments int64 `json:"num_comments" cql:"num_comments"` IsClassified bool `json:"is_classified" cql: "is_classified"` IsHatespeech bool `json:"is_hatespech" cql: "is_hatespech"` ProbaHateful float64 `json:"proba_hateful" cql:"proba_hateful"` ProbaNotHateful float64 `json:"proba_not_hateful" cql:"proba_not_hateful"` RemovedByCategory string `json:"removed_by_category"` }
Submission contains the info of a submission Not all data is stored
type SubmissionListing ¶
type SubmissionListing struct { Kind string `json:"kind"` Data SubmissionListingData `json:"data"` }
SubmissionListing is the top object of the returned json
func (*SubmissionListing) UnwrapData ¶
func (p *SubmissionListing) UnwrapData() ([]Submission, error)
UnwrapData unwraps the nested children from a CommentListing and returns the children as a lit of Comment
type SubmissionListingData ¶
type SubmissionListingData struct { Modhash interface{} `json:"modhash"` Dist int64 `json:"dist"` Children []PostListingChild `json:"children"` After string `json:"after"` Before interface{} `json:"before"` }
SubmissionListingData if the list component