jschan

package
v0.0.0-...-0b6275e Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: LGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CatalogResponse

type CatalogResponse []models.Post

type Client

type Client struct {
	BaseURL       string
	SessionCookie string
	CsrfToken     string
	HTTPClient    *http.Client
}

func NewClient

func NewClient(baseURL string) *Client

func (*Client) GetBanners

func (c *Client) GetBanners(ctx context.Context, options *GetBannersOptions) (GetBannersResponse, error)

func (*Client) GetBoardsPublic

func (c *Client) GetBoardsPublic(ctx context.Context, options *GetBoardsPublicOptions) (*GetBoardsResponse, error)

func (*Client) GetCSRFToken

func (c *Client) GetCSRFToken(ctx context.Context) (*GetCSRFTokenResponse, error)

func (*Client) GetCatalog

func (c *Client) GetCatalog(ctx context.Context, options *GetCatalogOptions) (CatalogResponse, error)

func (*Client) GetCustomPage

func (c *Client) GetCustomPage(ctx context.Context, options *GetCustomPageOptions) (*GetCustomPageResponse, error)

func (*Client) GetGlobalSettings

func (c *Client) GetGlobalSettings(ctx context.Context) (*CatalogResponse, error)

func (*Client) GetIndex

func (c *Client) GetIndex(ctx context.Context, options *GetIndexOptions) (*[]GetIndexResponse, error)

func (*Client) GetLogs

func (c *Client) GetLogs(ctx context.Context, options *GetLogsOptions) (GetLogsResponse, error)

func (*Client) GetLogsList

func (c *Client) GetLogsList(ctx context.Context, options *GetLogsListOptions) (GetLogsListResponse, error)

func (*Client) GetManageBoards

func (c *Client) GetManageBoards(ctx context.Context, options *GetManageBoardsOptions) (*GetBoardsResponse, error)

func (*Client) GetManageRecent

func (c *Client) GetManageRecent(ctx context.Context, options *GetManageRecentOptions) (GetManageRecentResponse, error)

func (*Client) GetManageReports

func (c *Client) GetManageReports(ctx context.Context, options *GetManageReportsOptions) (*GetManageReportsResponse, error)

func (*Client) GetOverboardCatalog

func (c *Client) GetOverboardCatalog(ctx context.Context, options *GetOverboardOptions) (*GetOverboardResponse, error)

func (*Client) GetOverboardIndex

func (c *Client) GetOverboardIndex(ctx context.Context, options *GetOverboardOptions) (*GetOverboardResponse, error)

func (*Client) GetSettings

func (c *Client) GetSettings(ctx context.Context, options *GetSettingsOptions) (*GetSettingsResponse, error)

func (*Client) GetThread

func (c *Client) GetThread(ctx context.Context, options *GetThreadOptions) (*GetThreadResponse, error)

func (*Client) GetWebring

func (c *Client) GetWebring(ctx context.Context) (*GetWebringResponse, error)

func (*Client) Login

func (c *Client) Login(ctx context.Context, options *PostLoginOptions) error

func (*Client) MakePost

func (c *Client) MakePost(ctx context.Context, options *MakePostOptions) error

func (*Client) SubmitPostActions

func (c *Client) SubmitPostActions(ctx context.Context, options *MakePostOptions) error

type DynamicResponse

type DynamicResponse struct {
	Title    string `json:"title"`
	Message  string `json:"message"`
	Redirect string `json:"redirect,omitempty"`
}

type GetBannersOptions

type GetBannersOptions struct {
	Board string
}

type GetBannersResponse

type GetBannersResponse []string

type GetBoardsPublicOptions

type GetBoardsPublicOptions struct {
	Search        string
	Sort          string
	SortDirection string
	Page          int
	LocalFirst    bool
	Sites         []string
}

type GetBoardsResponse

type GetBoardsResponse struct {
	Boards  []models.Board `json:"boards"`
	Page    int            `json:"page"`
	MaxPage int            `json:"maxPage"`
}

type GetCSRFTokenResponse

type GetCSRFTokenResponse struct {
	Token string `json:"token"`
}

type GetCatalogOptions

type GetCatalogOptions struct {
	Board string
}

type GetCustomPageOptions

type GetCustomPageOptions struct {
	Board      string
	CustomPage string
}

type GetCustomPageResponse

type GetCustomPageResponse struct {
	*models.CustomPage
}

type GetGlobalSettingsResponse

type GetGlobalSettingsResponse struct {
	*models.GlobalSettings
}

type GetIndexOptions

type GetIndexOptions struct {
	Board string
	Page  int
}

type GetIndexResponse

type GetIndexResponse struct {
	*models.Post
}

type GetLogsListOptions

type GetLogsListOptions struct {
	Board string
}

type GetLogsListResponse

type GetLogsListResponse []models.LogList

type GetLogsOptions

type GetLogsOptions struct {
	Board string
	Date  models.LogDate
}

type GetLogsResponse

type GetLogsResponse []models.Log

type GetManageBoardsOptions

type GetManageBoardsOptions struct {
	Search          string `json:"search"`
	Sort            string `json:"sort"`
	SortDirection   string `json:"direction"`
	Page            int    `json:"page"`
	FilterUnlisted  bool   `json:"filter_unlisted"`
	FilterSfw       bool   `json:"filter_sfw"`
	FilterAbandoned bool   `json:"filter_abandoned"`
}

type GetManageRecentOptions

type GetManageRecentOptions struct {
	Board string
}

type GetManageRecentResponse

type GetManageRecentResponse []models.Post

type GetManageReportsOptions

type GetManageReportsOptions struct {
	Page  int
	IP    string
	Board string
}

type GetManageReportsResponse

type GetManageReportsResponse struct {
	Reports     []models.Post `json:"reports"`
	Page        int           `json:"page"`
	IP          string        `json:"ip"`
	QueryString string        `json:"queryString"`
}

type GetOverboardOptions

type GetOverboardOptions struct {
	AddBoards      []string
	RemoveBoards   []string
	IncludeDefault bool
}

type GetOverboardResponse

type GetOverboardResponse struct {
	Threads []models.Post `json:"threads"`
}

type GetSettingsOptions

type GetSettingsOptions struct {
	Board string
}

type GetSettingsResponse

type GetSettingsResponse struct {
	*models.BoardSettings
}

type GetThreadOptions

type GetThreadOptions struct {
	Board    string
	ThreadId int
}

type GetThreadResponse

type GetThreadResponse struct {
	*models.Post
}

type GetWebringResponse

type GetWebringResponse struct {
	*models.Webring
}

type MakePostOptions

type MakePostOptions struct {
	Board         string
	Thread        int
	Name          string
	Message       string
	Subject       string
	Email         string
	PostPassword  string
	Files         []string
	Spoiler       []string
	SpoilerAll    bool
	StripFilename []string
	CustomFlag    string
	Captcha       []string
	Mod           bool
}

type PostLoginOptions

type PostLoginOptions struct {
	Username  string
	Password  string
	Twofactor string
}

type ReturnHeaders

type ReturnHeaders struct {
	*http.Header
}

type SubmitPostActionsOptions

type SubmitPostActionsOptions struct {
	CheckedPosts      []string
	CheckedReports    []string
	Board             string
	Captcha           []string
	PostPassword      string
	Ban               bool
	BanGlobal         bool
	BanHalfRange      bool
	BanQuarterRance   bool
	BanReporter       bool
	BanReporterGlobal bool
	BanReason         string
	BanDuration       string
	Move              bool
	MoveToThread      int
	Sticky            int
	ToggleCyclic      bool
	ToggleBumplock    bool
	ToggleLock        bool
	Spoiler           bool
	Delete            bool
	DeleteFiles       bool
	UnlinkFiles       bool
	DeleteIPThread    bool
	DeleteIPBoard     bool
	DeleteIPGlobal    bool
	Dismiss           bool
	DismissGlobal     bool
	Report            bool
	ReportGlobal      bool
	ReportReason      string
	HideName          bool
	NoAppeal          bool
	PreservePost      bool
	LogMessage        string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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