models

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article struct {
	Post Post `json:"post"`
}

type ClubInfo

type ClubInfo struct {
	Type          string `json:"type"`
	Slug          string `json:"slug"`
	CommentCount  int    `json:"comment_count"`
	ViewCount     int    `json:"view_count"`
	Upvotes       int    `json:"upvotes"`
	IsPublic      bool   `json:"is_public"`
	IsCommentable bool   `json:"is_commentable"`
}

type FeedItem

type FeedItem struct {
	ID            string       `json:"id"`
	URL           string       `json:"url"`
	Title         string       `json:"title"`
	ContentText   string       `json:"content_text"`
	DatePublished time.Time    `json:"date_published"`
	DateModified  time.Time    `json:"date_modified"`
	Authors       []ItemAuthor `json:"authors"`
	Club          ClubInfo     `json:"_club"`
}

func (*FeedItem) AuthorsUsernames

func (item *FeedItem) AuthorsUsernames() []string

func (*FeedItem) Ref

func (item *FeedItem) Ref() string

type FeedPage

type FeedPage struct {
	Version     string     `json:"version"`
	Title       string     `json:"title"`
	HomePageURL string     `json:"home_page_url"`
	FeedURL     string     `json:"feed_url"`
	NextURL     string     `json:"next_url"`
	Items       []FeedItem `json:"items"`
}

type ItemAuthor

type ItemAuthor struct {
	Name   string `json:"name"`
	URL    string `json:"url"`
	Avatar string `json:"avatar"`
}

type Post

type Post struct {
	ID            string       `json:"id"`
	URL           string       `json:"url"`
	Title         string       `json:"title"`
	ContentText   string       `json:"content_text"`
	DatePublished time.Time    `json:"date_published"`
	DateModified  time.Time    `json:"date_modified"`
	Authors       []ItemAuthor `json:"authors"`
	Club          ClubInfo
}

Jump to

Keyboard shortcuts

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