Documentation
¶
Index ¶
- Constants
- Variables
- 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(webtoons []SearchData) []payload.Info
- func (b *Builder) Provider() models.Provider
- func (b *Builder) Search(s SearchOptions) ([]SearchData, error)
- func (b *Builder) Transform(s payload.SearchRequest) SearchOptions
- type Chapter
- type Repository
- type SearchData
- type SearchOptions
- type Series
Constants ¶
View Source
const ( Domain = "https://www.webtoons.com" BaseUrl = "https://www.webtoons.com/en/" SearchUrl = BaseUrl + "search?keyword=%s" ImagePrefix = "https://webtoon-phinf.pstatic.net/" EpisodeList = Domain + "/episodeList?titleNo=%s" )
Variables ¶
View Source
var (
ErrMissingSource = errors.New("not all img had a source")
)
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) ([]SearchData, error)
func (*Builder) Transform ¶
func (b *Builder) Transform(s payload.SearchRequest) SearchOptions
type Chapter ¶
func (Chapter) GetChapter ¶
type Repository ¶
type Repository interface {
Search(ctx context.Context, options SearchOptions) ([]SearchData, error)
LoadImages(ctx context.Context, chapter Chapter) ([]string, error)
SeriesInfo(ctx context.Context, id string) (*Series, error)
}
func NewRepository ¶
func NewRepository(httpClient *menou.Client, log zerolog.Logger) Repository
type SearchData ¶
type SearchData struct {
Id string `json:"titleNo"`
Name string `json:"title"`
ReadCount string `json:"readCount"`
ThumbnailMobile string `json:"thumbnailMobile"`
AuthorNameList []string `json:"authorNameList"`
Genre string `json:"representGenre"`
Rating bool `json:"titleUnsuitableForChildren"`
}
func (*SearchData) ComicInfoRating ¶
func (s *SearchData) ComicInfoRating() comicinfo.AgeRating
func (*SearchData) ProxiedImage ¶
func (s *SearchData) ProxiedImage() string
func (*SearchData) Url ¶
func (s *SearchData) Url() string
type SearchOptions ¶
type SearchOptions struct {
Query string
}
Click to show internal directories.
Click to hide internal directories.