models

package
v0.0.0-...-3d176a0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2020 License: Apache-2.0 Imports: 0 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwardSubType

type AwardSubType string

AwardSubType ...

type AwardType

type AwardType string

AwardType ...

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

type CommentChild struct {
	Kind string  `json:"kind"`
	Data Comment `json:"data"`
}

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

type FlairRichtext struct {
	E string `json:"e"`
	T string `json:"t"`
}

FlairRichtext ...

type Gilding

type Gilding struct {
	Gid map[string]int `json:"gid"`
}

Gilding ...

type Gildings

type Gildings struct {
	Gid1 *int64 `json:"gid_1,omitempty"`
	Gid2 *int64 `json:"gid_2,omitempty"`
}

Gildings ...

type IconFormat

type IconFormat string

IconFormat ...

type Image

type Image struct {
	Source      ResizedIcon   `json:"source"`
	Resolutions []ResizedIcon `json:"resolutions"`
	Variants    MediaEmbed    `json:"variants"`
	ID          string        `json:"id"`
}

Image ...

type MediaEmbed

type MediaEmbed struct {
}

MediaEmbed ...

type PostListingChild

type PostListingChild struct {
	Kind string     `json:"kind"`
	Data Submission `json:"data"`
}

PostListingChild ...

type Preview

type Preview struct {
	Images  []Image `json:"images"`
	Enabled bool    `json:"enabled"`
}

Preview ...

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL