struct MangaDex::Client
- MangaDex::Client
- Struct
- Value
- Object
Defined in:
mangadex/client.crConstant Summary
-
BOUNDARY =
"__X_MDCR_BOUNDARY__"
Constructors
Instance Method Summary
- #auth(username, password)
- #auth?
- #chapter(id : String | Int64) : Chapter
- #get(url, *, api = true)
- #get_headers : HTTP::Headers
- #group(id : String | Int64) : Group
- #manga(id : String | Int64) : Manga
-
#partial_search(query : String) : Array(PartialManga)
Searches
https://mangadex.org/quick_search/:query
, and scrapes everything as a list ofPartialManga
s. - #post(url, body)
-
#search(query : String) : Array(Manga)
Searches
https://mangadex.org/quick_search/:query
, scrapes the manga ids, and uses the API to get a list of manga from the ids. - #token : String | Nil
- #token=(token : String | Nil)
- #token_expires : Time
- #token_expires=(token_expires : Time)
- #user(id : String | Int64 = "me") : User
- #user_id : Int64 | Nil
- #user_id=(user_id : Int64 | Nil)
Constructor Detail
def self.new(*, base_url : String = "https://mangadex.org", api_url : String = "https://api.mangadex.org/v2")
#
Instance Method Detail
def partial_search(query : String) : Array(PartialManga)
#
Searches https://mangadex.org/quick_search/:query
, and scrapes
everything as a list of PartialManga
s. This does not use the API,
and sends only one request to MangaDex, so it is much faster than
#search
.
Searches https://mangadex.org/quick_search/:query
, scrapes the manga
ids, and uses the API to get a list of manga from the ids.