gochan

package module
v0.0.0-...-9dc4149 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const BoardsEndPoint = "https://a.4cdn.org/boards.json"
View Source
const ThreadsEndPoint = "https://a.4cdn.org/po/threads.json"

Variables

This section is empty.

Functions

This section is empty.

Types

type Board

type Board struct {
	Board           string        `json:"board"`
	Title           string        `json:"title"`
	WsBoard         ChanBool      `json:"ws_board"`
	PerPage         uint8         `json:"per_page"`
	Pages           uint8         `json:"pages"`
	MaxFileSize     int64         `json:"max_filesize"`
	MaxWebmFileSize int64         `json:"max_webm_filesize"`
	MaxCommentChars uint16        `json:"max_comment_chars"`
	MaxWebmDuration time.Duration `json:"max_webm_duration"`
	BumpLimit       uint16        `json:"bump_limit"`
	ImageLimit      uint16        `json:"image_limit"`
	CoolDowns       CoolDown      `json:"cooldowns"`
	MetaDescription string        `json:"meta_description"`
	Spoilers        ChanBool      `json:"spoilers"`
	CustomSpoilers  uint16        `json:"custom_spoilers"`
	IsArchived      ChanBool      `json:"is_archived"`
	TrollFlags      ChanBool      `json:"troll_flags"`
	CountryFlags    ChanBool      `json:"country_flags"`
	UserIDs         ChanBool      `json:"user_ids"`
	Oekaki          ChanBool      `json:"oekaki"`
	TextOnly        ChanBool      `json:"text_only"`
	ForcedAnon      ChanBool      `json:"forced_anon"`
	WebmAudio       ChanBool      `json:"webm_audio"`
	RequireSubject  ChanBool      `json:"require_subject"`
	MinImageWidth   uint32        `json:"min_image_width"`
	MinImageHeight  uint32        `json:"min_image_height"`
}

func GetBoards

func GetBoards() ([]Board, error)

type Boards

type Boards struct {
	Boards []Board `json:"boards"`
}

type ChanBool

type ChanBool bool

func (*ChanBool) UnmarshalJSON

func (cb *ChanBool) UnmarshalJSON(data []byte) error

type CoolDown

type CoolDown struct {
	Threads uint16 `json:"threads"`
	Replies uint16 `json:"replies"`
	Images  uint16 `json:"images"`
}

type Thread

type Thread struct {
	Number       int64 `json:"no"`
	LastModified int64 `json:"last_modified"`
	Replies      uint8 `json:"replies"`
}

type Threads

type Threads struct {
	Page    uint8    `json:"page"`
	Threads []Thread `json:"threads"`
}

func GetThreads

func GetThreads() ([]Threads, error)

Jump to

Keyboard shortcuts

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