Documentation
¶
Index ¶
- type Chapter
- type Manga
- type MangaMeta
- type Review
- type SQLite
- func (r *SQLite) GetAll() []Manga
- func (r *SQLite) GetByID(mangaID string) Manga
- func (r *SQLite) GetChapters(MangaID string) []Chapter
- func (r *SQLite) GetReview(MangaID string) Review
- func (r *SQLite) UpdateChapterDownloaded(c Chapter) Chapter
- func (r *SQLite) UpdateChapterRead(c Chapter)
- func (r *SQLite) UpdateTimeModified(m Manga) Manga
- type SeriesFeed
- type Tag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chapter ¶
type Chapter struct { ChapterHash string ChapterNum float64 ChapterName string VolumeNum int MangaID string Downloaded bool IsRead bool ChapterPath string }
Hold a single chapter of a manga.
func DownloadChapters ¶
Downloads the given chapters, returning the updated entries. Any chapters with Chapter.Downloaded == true are ignored.
func (Chapter) Description ¶
type Manga ¶
type Manga struct { MangaID string SerTitle string FullTitle string Descr string TimeModified time.Time Tags []Tag Chapters []Chapter Demographic string PubStatus string Review Review // contains filtered or unexported fields }
func NewManga ¶
Create a new Manga, store it in the DB, and return it. This does not do anything with feeds or getting the chapters, it only gets the series info.
func RefreshFeed ¶
Pull the MD feed and add the chapters to the DB. Returns the updated Manga.
func (Manga) Description ¶
type MangaMeta ¶
type MangaMeta struct { Result string `json:"result"` Response string `json:"response"` Data struct { ID string `json:"id"` Type string `json:"type"` Attributes struct { Title struct { En string `json:"en"` } `json:"title"` AltTitles []struct { Ja string `json:"ja,omitempty"` JaRo string `json:"ja-ro,omitempty"` En string `json:"en,omitempty"` } `json:"altTitles"` Description struct { En string `json:"en"` } `json:"description"` LastVolume string `json:"lastVolume"` LastChapter string `json:"lastChapter"` PublicationDemographic string `json:"publicationDemographic"` Status string `json:"status"` Tags []struct { //ID string `json:"id"` //Type string `json:"type"` Attributes struct { Name struct { En string `json:"en"` } `json:"name"` } `json:"attributes"` } `json:"tags"` } `json:"attributes"` } `json:"data"` }
This stores the response from a `manga/%s` API query to be parsed into more useful forms.
func PullMangaMeta ¶
Retrieve and parse the metadata for this given series from the series' ID.
type Review ¶
type Review struct { MangaID string Rating int // Rating can be whatever you want, but I intended it to be some n/100 Rev string // The full text of your review }
A review of a Manga.
type SQLite ¶
type SQLite struct {
// contains filtered or unexported fields
}
Store the SQL connection.
func Opendb ¶
Get a new DB connection. Guarantees that the file you specify will be created and the tables will be initialized.
func (*SQLite) GetChapters ¶
Get all the chapters for a given manga.
func (*SQLite) UpdateChapterDownloaded ¶
Update Downloaded for the given Chapter in the DB and return the updated Chapter.
func (*SQLite) UpdateChapterRead ¶
Update IsRead for the given Chapter in the DB.
func (*SQLite) UpdateTimeModified ¶
Update the TimeModified for the given Manga in the DB and return the updated Manga.