forum

package
v0.0.0-...-f3179c4 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ForumClient

type ForumClient struct {
	// contains filtered or unexported fields
}

ForumClient provides programatic access to SA:MP forum

func NewForumClient

func NewForumClient() (fc *ForumClient, err error)

NewForumClient creates a new forum clienta

func (*ForumClient) GetHTMLRoot

func (fc *ForumClient) GetHTMLRoot(url string) (*xmlpath.Node, error)

GetHTMLRoot returns page content as goquery.Document

func (*ForumClient) GetUserProfilePage

func (fc *ForumClient) GetUserProfilePage(url string) (UserProfile, error)

GetUserProfilePage does a HTTP GET on the user's profile page then extracts structured information from it.

func (*ForumClient) NewPostAlert

func (fc *ForumClient) NewPostAlert(id string, fn func())

NewPostAlert will call `fn` when the specified user posts or edits a post

type UserProfile

type UserProfile struct {
	UserName   string
	JoinDate   string
	TotalPosts int
	Reputation int
	DiscordID  string
	Errors     []error
}

UserProfile stores data available on a user's profile page

Jump to

Keyboard shortcuts

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