mangadex

package module
v0.0.0-...-ad3d4c6 Latest Latest
Warning

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

Go to latest
Published: May 26, 2020 License: MIT Imports: 8 Imported by: 0

README

go-mangadex

Documentation

Index

Constants

View Source
const (
	// Hentai settings
	HentaiHidden HentaiSetting = iota
	HentaiShown
	HentaiOnly

	// Chapter types
	ChapterInternal ChapterType = iota
	ChapterDelayed
	ChapterExternal
)

Variables

View Source
var (
	EndpointMangaDex = "https://mangadex.org/"

	EndpointBakaUpdates                = "https://www.mangaupdates.com/series.html?id="
	EndpointBookwalker                 = "http://bookwalker.jp/"
	EndpointAmazon                     = ""
	EndpointEBookJapan                 = ""
	EndpointOfficialEnglishTranslation = ""
	EndpointNovelUpdates               = "https://www.novelupdates.com/series/"
	EndpointCDJapan                    = ""

	EndpointManga   = EndpointMangaDex + "title/"
	EndpointChapter = EndpointMangaDex + "chapter/"
	EndpointUser    = EndpointMangaDex + "user/"
	EndpointGroup   = EndpointMangaDex + "group/"
	EndpointAJAX    = EndpointMangaDex + "ajax/actions.ajax.php"
	EndpointLogin   = EndpointMangaDex + "login"
)
View Source
var Genres = []string{
	"4-Koma",
	"Action",
	"Adventure",
	"Award Winning",
	"Comedy",
	"Cooking",
	"Doujinshi",
	"Drama",
	"Ecchi",
	"Fantasy",
	"Gyaru",
	"Harem",
	"Historical",
	"Horror",
	"Martial Arts",
	"Mecha",
	"Medical",
	"Music",
	"Mystery",
	"Oneshot",
	"Psychological",
	"Romance",
	"School Life",
	"Sci-Fi",
	"Shoujo Ai",
	"Shounen Ai",
	"Slice of Life",
	"Smut",
	"Sports",
	"Supernatural",
	"Tragedy",
	"Long Strip",
	"Yaoi",
	"Yuri",
	"Video Games",
	"Isekai",
	"Adaptation",
	"Anthology",
	"Web Comic",
	"Full Color",
	"User Created",
	"Official Colored",
	"Fan Colored",
	"Gore",
	"Sexual Violence",
	"Crime",
	"Magical Girls",
	"Philosophical",
	"Superhero",
	"Thriller",
	"Wuxia",
	"Aliens",
	"Animals",
	"Crossdressing",
	"Demons",
	"Delinquents",
	"Genderswap",
	"Ghosts",
	"Monster Girls",
	"Loli",
	"Magic",
	"Military",
	"Monsters",
	"Ninja",
	"Office Workers",
	"Police",
	"Post-Apocalyptic",
	"Reincarnation",
	"Reverse Harem",
	"Samurai",
	"Shota",
	"Survival",
	"Time Travel",
	"Vampires",
	"Traditional Games",
	"Virtual Reality",
	"Zombies",
	"Incest",
}

Functions

This section is empty.

Types

type AJAX

type AJAX struct {
	Function string `json:"function"`
}

type Chapter

type Chapter struct {
	ID           int         `json:"id"`
	Title        string      `json:"title"`
	Language     string      `json:"language"`
	Volume       int         `json:"volume"`
	Number       int         `json:"number"`
	Type         ChapterType `json:"type"`
	URL          string      `json:"url"`
	Timestamp    int64       `json:"timestamp"`
	GroupIDs     []int       `json:"group_ids"`
	CommentCount int         `json:"comment_count"`
	Longstrip    bool        `json:"longstrip"`
	PageURLs     []string    `json:"page_urls"`
	MangaID      int         `json:"manga_id"`
}

type ChapterType

type ChapterType int

type Client

type Client struct {
	Session *Session `json:"session"`
}

func New

func New(userAgent string) *Client

type Group

type Group struct {
	ID          int      `json:"id"`
	Title       string   `json:"title"`
	Description string   `json:"description"`
	Language    string   `json:"language"`
	Views       int      `json:"views"`
	Followers   int      `json:"followers"`
	Uploads     int      `json:"uploads"`
	LeaderID    string   `json:"leader_id"`
	MemberIDs   []string `json:"member_ids"`
	Links       []string `json:"links"`
}

type HentaiSetting

type HentaiSetting int

type Home

type Home struct {
	NewestIDs     []int `json:"newest_ids"`
	Top6hIDs      []int `json:"top_6h_ids"`
	Top24hIDs     []int `json:"top_24h_ids"`
	Top7dIDs      []int `json:"top_7d_ids"`
	TopFollowsIDs []int `json:"top_follows_ids"`
	TopRatingIDs  []int `json:"top_rating_ids"`
}

type MDList

type MDList struct {
	ID       int   `json:"id"`
	MangaIDs []int `json:"manga_ids"`
	Pages    int   `json:"pages"`

	BannerURL string `json:"banner_url"`
}

type Manga

type Manga struct {
	ID          int      `json:"id"`
	Title       string   `json:"title"`
	AltTitles   []string `json:"alt_titles"`
	Language    string   `json:"language"`
	CoverURL    string   `json:"cover_url"`
	Authors     []string `json:"authors"`
	Artists     []string `json:"artists"`
	GenreIDs    []int    `json:"genres"`
	Hentai      bool     `json:"hentai"`
	Rating      int      `json:"rating"`
	Views       int      `json:"views"`
	Description string   `json:"description"`
	ChapterIDs  []int    `json:"chapters"`
	Links       []string `json:"links"`
}

type Post

type Post struct {
	ID       int    `json:"id"`
	AuthorID int    `json:"author_id"`
	Text     string `json:"text"`
}

type Session

type Session struct {
	ID            string        `json:"id"`
	PersistentID  string        `json:"persistent_id"`
	Expires       time.Time     `json:"expires"`
	User          *User         `json:"user"`
	UserAgent     string        `json:"user_agent"`
	HentaiSetting HentaiSetting `json:"hentai_setting"`
	// contains filtered or unexported fields
}

func (*Session) Login

func (session *Session) Login(username, password string, remember bool) error

Login to session.

func (*Session) Logout

func (session *Session) Logout() error

Logout of session.

type Thread

type Thread struct {
	ID      int
	Pages   int
	PostIDs []int
}

type User

type User struct {
	ID        int    `json:"id"`
	Username  string `json:"username"`
	Biography string `json:"biography"`
	Language  string `json:"language"`
	Views     int    `json:"views"`
	Uploads   int    `json:"uploads"`
	Website   string `json:"website"`
	AvatarURL string `json:"avatar_url"`
}

Jump to

Keyboard shortcuts

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