|
|
|
@ -12,9 +12,9 @@ type LastPostTimestamp struct { |
|
|
|
|
Color string `json:"color"` |
|
|
|
|
} |
|
|
|
|
type Settings struct { |
|
|
|
|
Sfw bool `json:"sfw"` |
|
|
|
|
Name string `json:"name"` |
|
|
|
|
Description string `json:"description"` |
|
|
|
|
Sfw bool `json:"sfw"` |
|
|
|
|
Name string `json:"name"` |
|
|
|
|
Description string `json:"description"` |
|
|
|
|
UnlistedLocal bool `json:"unlistedLocal,omitempty"` |
|
|
|
|
} |
|
|
|
|
type Boards struct { |
|
|
|
@ -32,18 +32,18 @@ type Boards struct { |
|
|
|
|
Ppd int `json:"ppd,omitempty"` |
|
|
|
|
} |
|
|
|
|
type GetBoardsResponse struct { |
|
|
|
|
Boards []Boards `json:"boards"` |
|
|
|
|
Page int `json:"page"` |
|
|
|
|
MaxPage int `json:"maxPage"` |
|
|
|
|
Boards []Boards `json:"boards"` |
|
|
|
|
Page int `json:"page"` |
|
|
|
|
MaxPage int `json:"maxPage"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type GetBoardsPublicOptions struct { |
|
|
|
|
Search string `json:"search"` |
|
|
|
|
Sort string `json:"sort"` |
|
|
|
|
SortDirection string `json:"direction"` |
|
|
|
|
Page int `json:"page"` |
|
|
|
|
LocalFirst bool `json:"local_first"` |
|
|
|
|
Sites []string `json:"sites"` |
|
|
|
|
Search string `json:"search"` |
|
|
|
|
Sort string `json:"sort"` |
|
|
|
|
SortDirection string `json:"direction"` |
|
|
|
|
Page int `json:"page"` |
|
|
|
|
LocalFirst bool `json:"local_first"` |
|
|
|
|
Sites []string `json:"sites"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (c *Client) GetBoardsPublic(ctx context.Context, options *GetBoardsPublicOptions) (*GetBoardsResponse, error) { |
|
|
|
@ -77,7 +77,7 @@ func (c *Client) GetBoardsPublic(ctx context.Context, options *GetBoardsPublicOp |
|
|
|
|
|
|
|
|
|
url := fmt.Sprintf("%s/boards.json?%s", c.BaseURL, query.Encode()) |
|
|
|
|
|
|
|
|
|
req, err := http.NewRequest("GET", url, nil); |
|
|
|
|
req, err := http.NewRequest("GET", url, nil) |
|
|
|
|
if err != nil { |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
@ -94,13 +94,13 @@ func (c *Client) GetBoardsPublic(ctx context.Context, options *GetBoardsPublicOp |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
type GetBoardsGlobalmanageOptions 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"` |
|
|
|
|
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"` |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func (c *Client) GetBoardsGlobalmanage(ctx context.Context, options *GetBoardsGlobalmanageOptions) (*GetBoardsResponse, error) { |
|
|
|
@ -139,7 +139,7 @@ func (c *Client) GetBoardsGlobalmanage(ctx context.Context, options *GetBoardsGl |
|
|
|
|
|
|
|
|
|
url := fmt.Sprintf("%s/boards.json?%s", c.BaseURL, query.Encode()) |
|
|
|
|
|
|
|
|
|
req, err := http.NewRequest("GET", url, nil); |
|
|
|
|
req, err := http.NewRequest("GET", url, nil) |
|
|
|
|
|
|
|
|
|
if err != nil { |
|
|
|
|
return nil, err |
|
|
|
|