libgen

package module
v0.0.0-...-69d6d26 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: MIT Imports: 6 Imported by: 1

README

golibgen

Installation

go get github.com/irth/golibgen

Usage example

package main

import (
	"fmt"

	libgen "github.com/irth/golibgen"
)

func main() {
	sp := libgen.FictionSearchProvider{}
	books, _ := sp.Find("query")
	fmt.Println(books[0].DownloadLink())
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Book

type Book interface {
	Title() string
	Author() string
	Format() string
	Size() string
	Language() string
	DownloadLink() (string, error)
}

type FictionBook

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

func (FictionBook) Author

func (b FictionBook) Author() string
func (b FictionBook) DownloadLink() (string, error)

func (FictionBook) Format

func (b FictionBook) Format() string

func (FictionBook) Language

func (b FictionBook) Language() string

func (FictionBook) Size

func (b FictionBook) Size() string

func (FictionBook) Title

func (b FictionBook) Title() string

type FictionSearchProvider

type FictionSearchProvider struct{}

func (FictionSearchProvider) Find

func (l FictionSearchProvider) Find(query string) ([]Book, error)

type LibgenBook

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

func (LibgenBook) Author

func (b LibgenBook) Author() string
func (b LibgenBook) DownloadLink() (string, error)

func (LibgenBook) Format

func (b LibgenBook) Format() string

func (LibgenBook) Language

func (b LibgenBook) Language() string

func (LibgenBook) Size

func (b LibgenBook) Size() string

func (LibgenBook) Title

func (b LibgenBook) Title() string

type LibgenSearchProvider

type LibgenSearchProvider struct{}

func (LibgenSearchProvider) Find

func (l LibgenSearchProvider) Find(query string) ([]Book, error)

type SearchProvider

type SearchProvider interface {
	Find(query string) ([]Book, error)
}

Jump to

Keyboard shortcuts

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