Documentation ¶
Index ¶
- Constants
- Variables
- func ParseSearch(stream io.Reader) (result *[]ListItem, err error)
- type DownloadResult
- type FlibustaClient
- func (c *FlibustaClient) Download(id string, bookFormat string) (result *DownloadResult, err error)
- func (c *FlibustaClient) Info(id string, ...) (result *InfoResult, err error)
- func (c *FlibustaClient) Search(searchQuery string, respProcessor func(stream io.Reader) (*[]ListItem, error)) (result *[]ListItem, err error)
- type Headers
- type InfoResult
- type ListItem
- type ResponseResult
Constants ¶
View Source
const ( FlibustaHostEnvKey = "FLIBUSTA_HOST" Fb2 = "fb2" Epub = "epub" Mobi = "mobi" )
Variables ¶
View Source
var ( FlibustaMirrors = []string{ "flibusta.is", "flibusta.site", "flibustahezeous3.onion", } TorproxySuggest = `docker run -it -p 8118:8118 -p 9050:9050 -d dperson/torproxy` )
View Source
var ( ItemInListIdRe = regexp.MustCompile(`[0-9]+$`) ItemInDescriptionIdRe = regexp.MustCompile(`b/([0-9]+)/read$`) )
View Source
var HostRe = regexp.MustCompile(`(?P<Scheme>https?)?(://)?(?P<Host>[0-8a-z.]+):?(?P<Port>[0-9]+)?/?`)
Functions ¶
Types ¶
type DownloadResult ¶
type FlibustaClient ¶
type FlibustaClient struct {
// contains filtered or unexported fields
}
func FromEnv ¶
func FromEnv() (*FlibustaClient, error)
func (*FlibustaClient) Download ¶
func (c *FlibustaClient) Download(id string, bookFormat string) (result *DownloadResult, err error)
func (*FlibustaClient) Info ¶ added in v0.2.0
func (c *FlibustaClient) Info(id string, respProcessor func(stream io.Reader) (result *InfoResult, err error)) (result *InfoResult, err error)
type InfoResult ¶ added in v0.2.0
type InfoResult struct { ID string Title string Genre string Annotation string Size string Formats []string }
func (*InfoResult) String ¶ added in v0.2.0
func (info *InfoResult) String() string
Click to show internal directories.
Click to hide internal directories.