mangadex

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mangadex

type Mangadex struct {
	DB           *models.DatabaseConfig
	ApiURL       string
	ViewMangaURL string
	// contains filtered or unexported fields
}

Mangadex is a struct used to attach all functionality available within this manga source

func NewMangadex

func NewMangadex(db *models.DatabaseConfig) *Mangadex

NewMangadex function returns a pointer to a Mangadex struct that can be used to call all of its methods

func (*Mangadex) GetLastMangaChapter added in v1.1.0

func (m *Mangadex) GetLastMangaChapter(mangaURL string) (string, error)

func (*Mangadex) QueryManga

func (m *Mangadex) QueryManga(name string) *models.ApiQuerySuggestions

QueryManga method receives a string that refers to the Manga name, it then makes a call to the Mangadex API, and with the results it returns a pointer to a ApiQuerySuggestions struct

func (*Mangadex) Subscribe

func (m *Mangadex) Subscribe(subscription *models.Subscription) error

Subscribe method receives a subscription model, this contains information about a User or Group that wants to receive alerts from a certain Manga title. The method will save this in a 'Subscription' collection in MongoDB, as well as set a value for the lastChapter of the Manga title.

func (*Mangadex) ViewManga

func (m *Mangadex) ViewManga() string

ViewManga method returns a string with the Manga's URL

Jump to

Keyboard shortcuts

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