disqus

package
v0.0.0-...-60a6317 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	Username                string `json:"username"`
	About                   string `json:"about"`
	Name                    string `json:"name"`
	Disable3RdPartyTrackers bool   `json:"disable3rdPartyTrackers"`
	IsPowerContributor      bool   `json:"isPowerContributor"`
	JoinedAt                string `json:"joinedAt"`
	ProfileURL              string `json:"profileUrl"`
	URL                     string `json:"url"`
	Location                string `json:"location"`
	IsPrivate               bool   `json:"isPrivate"`
	SignedURL               string `json:"signedUrl"`
	IsPrimary               bool   `json:"isPrimary"`
	IsAnonymous             bool   `json:"isAnonymous"`
	ID                      string `json:"id"`
	Avatar                  struct {
		Small struct {
			Permalink string `json:"permalink"`
			Cache     string `json:"cache"`
		} `json:"small"`
		Large struct {
			Permalink string `json:"permalink"`
			Cache     string `json:"cache"`
		} `json:"large"`
		Permalink string `json:"permalink"`
		Cache     string `json:"cache"`
		Xlarge    struct {
			Permalink string `json:"permalink"`
			Cache     string `json:"cache"`
		} `json:"xlarge"`
	} `json:"avatar"`
}

type Disqus

type Disqus struct{}

func NewDisqus

func NewDisqus() Disqus

func (Disqus) Fetch

func (s Disqus) Fetch(fi model.SiteInput) (model.Posts, error)

func (Disqus) GetInput

func (s Disqus) GetInput(url *url.URL, v ...string) (*model.SiteInput, error)

type ListPostsThreaded

type ListPostsThreaded struct {
	Cursor struct {
		Prev    any    `json:"prev"`
		HasNext bool   `json:"hasNext"`
		Next    string `json:"next"`
		HasPrev bool   `json:"hasPrev"`
		Total   int    `json:"total"`
		ID      string `json:"id"`
		More    bool   `json:"more"`
	} `json:"cursor"`
	Code     int    `json:"code"`
	Response []Post `json:"response"`
}

type Post

type Post struct {
	EditableUntil          string `json:"editableUntil"`
	Dislikes               int    `json:"dislikes"`
	Thread                 string `json:"thread"`
	NumReports             int    `json:"numReports"`
	Likes                  int    `json:"likes"`
	Message                string `json:"message"`
	ID                     string `json:"id"`
	CreatedAt              string `json:"createdAt"`
	Author                 Author `json:"author"`
	Media                  []any  `json:"media"`
	IsSpam                 bool   `json:"isSpam"`
	IsDeletedByAuthor      bool   `json:"isDeletedByAuthor"`
	IsHighlighted          bool   `json:"isHighlighted"`
	HasMore                bool   `json:"hasMore"`
	Parent                 int64  `json:"parent"`
	IsApproved             bool   `json:"isApproved"`
	IsNewUserNeedsApproval bool   `json:"isNewUserNeedsApproval"`
	IsDeleted              bool   `json:"isDeleted"`
	IsFlagged              bool   `json:"isFlagged"`
	RawMessage             string `json:"raw_message"`
	IsAtFlagLimit          bool   `json:"isAtFlagLimit"`
	CanVote                bool   `json:"canVote"`
	Forum                  string `json:"forum"`
	Depth                  int    `json:"depth"`
	Points                 int    `json:"points"`
	ModerationLabels       []any  `json:"moderationLabels"`
	IsEdited               bool   `json:"isEdited"`
	Sb                     bool   `json:"sb"`
}

Jump to

Keyboard shortcuts

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