Documentation
¶
Index ¶
- Constants
- func New(scope *dig.Scope) core.Downloadable
- type Builder
- func (b *Builder) Client() services.Client
- func (b *Builder) DownloadMetadata() payload.DownloadMetadata
- func (b *Builder) Logger() zerolog.Logger
- func (b *Builder) Normalize(mangas *MangaSearchResponse) []payload.Info
- func (b *Builder) Provider() models.Provider
- func (b *Builder) Search(s SearchOptions) (*MangaSearchResponse, error)
- func (b *Builder) Transform(s payload.SearchRequest) SearchOptions
- type ChapterAttributes
- type ChapterImageSearchResponse
- type ChapterInfo
- type ChapterSearchData
- func (chapter ChapterSearchData) Chapter() float64
- func (chapter ChapterSearchData) GetChapter() string
- func (chapter ChapterSearchData) GetId() string
- func (chapter ChapterSearchData) GetTitle() string
- func (chapter ChapterSearchData) GetVolume() string
- func (chapter ChapterSearchData) Volume() float64
- type ChapterSearchResponse
- type ContentRating
- type Cover
- type CoverFactory
- type GetMangaResponse
- type MangaAttributes
- type MangaCoverAttributes
- type MangaCoverData
- type MangaCoverResponse
- type MangaSearchData
- func (a *MangaSearchData) AllChapters() []ChapterSearchData
- func (a *MangaSearchData) Artists() []string
- func (a *MangaSearchData) Authors() []string
- func (a *MangaSearchData) CoverURL() string
- func (a *MangaSearchData) FormattedLinks() []string
- func (a *MangaSearchData) GetId() string
- func (a *MangaSearchData) GetTitle() string
- func (a *MangaSearchData) RefUrl() string
- func (a *MangaSearchData) ScanlationGroup() []string
- type MangaSearchResponse
- type MangaStatus
- type Relationship
- type Repository
- type Response
- type SearchOptions
- type TagAttributes
- type TagData
- type TagResponse
Constants ¶
View Source
const ( LanguageKey string = "tl-lang" // ScanlationGroupKey filter chapters on the group that translated it ScanlationGroupKey string = "scanlation_group" // AllowNonMatchingScanlationGroupKey if we should use chapters from groups not matching ScanlationGroupKey // Only takes effect if ScanlationGroupKey is set AllowNonMatchingScanlationGroupKey string = "allow_non_matching_scanlation_group" )
View Source
const URL = "https://api.mangadex.org"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func (*Builder) DownloadMetadata ¶
func (b *Builder) DownloadMetadata() payload.DownloadMetadata
func (*Builder) Search ¶
func (b *Builder) Search(s SearchOptions) (*MangaSearchResponse, error)
func (*Builder) Transform ¶
func (b *Builder) Transform(s payload.SearchRequest) SearchOptions
type ChapterAttributes ¶
type ChapterAttributes struct { Volume string `json:"volume"` Chapter string `json:"chapter"` Title string `json:"title"` TranslatedLanguage string `json:"translatedLanguage"` ExternalUrl string `json:"externalUrl"` PublishedAt string `json:"publishedAt"` ReadableAt string `json:"readableAt"` CreatedAt string `json:"createdAt"` UpdatedAt string `json:"updatedAt"` Pages int `json:"pages"` Version int `json:"version"` }
type ChapterImageSearchResponse ¶
type ChapterImageSearchResponse struct { Result string `json:"result"` BaseUrl string `json:"baseUrl"` Chapter ChapterInfo `json:"chapter"` }
func (*ChapterImageSearchResponse) FullImageUrls ¶
func (s *ChapterImageSearchResponse) FullImageUrls() []string
FullImageUrls returns the urls for full quality
type ChapterInfo ¶
type ChapterSearchData ¶
type ChapterSearchData struct { Id string `json:"id"` Type string `json:"type"` Attributes ChapterAttributes `json:"attributes"` Relationships []Relationship `json:"relationships"` }
func (ChapterSearchData) Chapter ¶
func (chapter ChapterSearchData) Chapter() float64
func (ChapterSearchData) GetChapter ¶
func (chapter ChapterSearchData) GetChapter() string
func (ChapterSearchData) GetId ¶
func (chapter ChapterSearchData) GetId() string
func (ChapterSearchData) GetTitle ¶
func (chapter ChapterSearchData) GetTitle() string
func (ChapterSearchData) GetVolume ¶
func (chapter ChapterSearchData) GetVolume() string
func (ChapterSearchData) Volume ¶
func (chapter ChapterSearchData) Volume() float64
type ChapterSearchResponse ¶
type ChapterSearchResponse Response[[]ChapterSearchData]
type ContentRating ¶
type ContentRating string
const ( ContentRatingSafe ContentRating = "safe" ContentRatingSuggestive ContentRating = "suggestive" ContentRatingErotica ContentRating = "erotica" ContentRatingPornographic ContentRating = "pornographic" )
func (ContentRating) ComicInfoAgeRating ¶
func (c ContentRating) ComicInfoAgeRating() comicinfo.AgeRating
func (ContentRating) MetronInfoAgeRating ¶
func (c ContentRating) MetronInfoAgeRating() metroninfo.AgeRating
type Cover ¶
type Cover struct { Bytes []byte Data MangaCoverData }
type CoverFactory ¶
type GetMangaResponse ¶
type GetMangaResponse Response[MangaSearchData]
type MangaAttributes ¶
type MangaAttributes struct { Title map[string]string `json:"title"` AltTitles []map[string]string `json:"altTitles"` Description map[string]string `json:"description"` IsLocked bool `json:"isLocked"` Links map[string]string `json:"links"` OriginalLanguage string `json:"originalLanguage"` LastVolume string `json:"lastVolume"` LastChapter string `json:"lastChapter"` Status MangaStatus `json:"status"` Year int `json:"year"` ContentRating ContentRating `json:"contentRating"` Tags []TagData `json:"tags"` }
func (*MangaAttributes) LangAltTitles ¶
func (a *MangaAttributes) LangAltTitles(language string) []string
func (*MangaAttributes) LangDescription ¶
func (a *MangaAttributes) LangDescription(language string) string
func (*MangaAttributes) LangTitle ¶
func (a *MangaAttributes) LangTitle(language string) string
LangTitle returns the best guess English title for the manga In order of tries; Title(language), AltTitles(language), Title(any), Fixed string with non 0 length
type MangaCoverAttributes ¶
type MangaCoverData ¶
type MangaCoverData struct { Id string `json:"id"` Type string `json:"type"` Attributes MangaCoverAttributes `json:"attributes"` Relationships []Relationship `json:"relationships"` }
type MangaCoverResponse ¶
type MangaCoverResponse Response[[]MangaCoverData]
type MangaSearchData ¶
type MangaSearchData struct { Id string `json:"id"` Type string `json:"type"` Attributes MangaAttributes `json:"attributes"` Relationships []Relationship `json:"relationships"` Language string `json:"-"` }
func (*MangaSearchData) AllChapters ¶
func (a *MangaSearchData) AllChapters() []ChapterSearchData
func (*MangaSearchData) Artists ¶
func (a *MangaSearchData) Artists() []string
func (*MangaSearchData) Authors ¶
func (a *MangaSearchData) Authors() []string
func (*MangaSearchData) CoverURL ¶
func (a *MangaSearchData) CoverURL() string
func (*MangaSearchData) FormattedLinks ¶
func (a *MangaSearchData) FormattedLinks() []string
func (*MangaSearchData) GetId ¶
func (a *MangaSearchData) GetId() string
func (*MangaSearchData) GetTitle ¶
func (a *MangaSearchData) GetTitle() string
func (*MangaSearchData) RefUrl ¶
func (a *MangaSearchData) RefUrl() string
func (*MangaSearchData) ScanlationGroup ¶
func (a *MangaSearchData) ScanlationGroup() []string
type MangaSearchResponse ¶
type MangaSearchResponse Response[[]MangaSearchData]
type MangaStatus ¶
type MangaStatus string
const ( StatusOngoing MangaStatus = "ongoing" StatusCompleted MangaStatus = "completed" StatusHiatus MangaStatus = "hiatus" StatusCancelled MangaStatus = "cancelled" )
type Relationship ¶
type Repository ¶
type Repository interface { GetManga(ctx context.Context, id string) (*GetMangaResponse, error) SearchManga(ctx context.Context, options SearchOptions) (*MangaSearchResponse, error) GetChapters(ctx context.Context, id string, offset ...int) (*ChapterSearchResponse, error) GetChapterImages(ctx context.Context, id string) (*ChapterImageSearchResponse, error) GetCoverImages(ctx context.Context, id string, offset ...int) (*MangaCoverResponse, error) }
func NewRepository ¶
func NewRepository(params repositoryParams, log zerolog.Logger) Repository
type SearchOptions ¶
type TagAttributes ¶
type TagData ¶
type TagData struct { Id string `json:"id"` Type string `json:"type"` Attributes TagAttributes `json:"attributes"` }
type TagResponse ¶
Click to show internal directories.
Click to hide internal directories.