Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manganelo ¶
type Manganelo struct { DB *models.DatabaseConfig ApiURL string ViewMangaURL string }
Manganelo is a struct used to attach all functionality available within this manga source.
func NewManganelo ¶
func NewManganelo(db *models.DatabaseConfig) *Manganelo
NewManganelo function returns a pointer to a Manganelo struct that can be used to call all of its methods.
func (*Manganelo) GetLastMangaChapter ¶
GetLastMangaChapter method receives the URL to a manga title and returns the last chapter published in this URL. An error might be returned if no URL is supplied or if it cannot connect to the URL
func (*Manganelo) QueryManga ¶
func (m *Manganelo) QueryManga(name string) *models.ApiQuerySuggestions
QueryManga method receives a string that refers to the Manga name, it then amkes a call to the Manganelo API, and with the results it returns a ApiQuerySuggestions struct.
func (*Manganelo) Subscribe ¶
func (m *Manganelo) 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.