forum

package
v0.0.0-...-43945a8 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Forum

type Forum struct {
	Name        string
	Posts       int
	Description string
	Threads     int
	URL         string
	LastPost    LastPost
}

Forum represents a forum

func GetForumList

func GetForumList(c *client.Client) ([]*Forum, error)

GetForumList returns a list of available forums

func (*Forum) GetThreadList

func (f *Forum) GetThreadList(page int, c *client.Client) (*ThreadList, error)

GetThreadList returns a list of threads for the given forum/page

type LastPost

type LastPost struct {
	Author      string
	URL         string
	CreatedAt   time.Time
	Achievement PostAchievement
}

LastPost represents a forum last post

type Post

type Post struct {
	Staff        bool
	ValuedPoster bool
	Content      string
	ContentText  string
	Author       string
	Badges       []*client.Badge
	Avatar       string
	Achievement  PostAchievement
	CreatedAt    time.Time
}

Post thread post content

type PostAchievement

type PostAchievement struct {
	Alt string
	URL string
}

PostAchievement post league achievements

type PostList

type PostList struct {
	List       []*Post
	Title      string
	ForumName  string
	ForumURL   string
	Items      []*client.Item
	Pagination *util.Pagination
}

PostList thread post list

type Thread

type Thread struct {
	ID         int64
	Staff      bool
	Support    bool
	Sticky     bool
	Locked     bool
	Title      string
	Replies    int
	Views      int
	URL        string
	Author     string
	CreatedAt  time.Time
	Pagination *util.Pagination
}

Thread forum thread

func (*Thread) GetPostList

func (t *Thread) GetPostList(page int, c *client.Client) (*PostList, error)

GetPostList returns the list of posts for the given thread

func (*Thread) Reply

func (t *Thread) Reply(msg string, c *client.Client) error

Reply posts a new reply for the given thread

type ThreadList

type ThreadList struct {
	ForumName  string
	Pagination *util.Pagination
	List       []*Thread
}

ThreadList forum thread list

Jump to

Keyboard shortcuts

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