mangadex-req
v5.2.0
Published
Request content from mangadex.
Maintainers
Readme
mangadex-req
Usage
const {request, getManga, getChapter, getFullURLs, getConnection} = require('mangadex-req')request(path, onResponse[, server])
path:<string>|<URL>|<Object>. Default'/'. Passed tohttp2session.request. Using<string>and<URL>types means different servers only need specification in the path.onResponse:<function>to call on the body, wherethisrefers to the connection itself, and the arguments arerequestData, resolve, reject, headers, flags. Default returns{heads, data}wheredatais a string.server:<string>|<URL>. Defaults tonew URL(path, 'https://mangadex.org').originifpathis astring,new URL('/', 'https://mangadex.org').originotherwise.
Returns Promise<res, rej>
getManga(mid)
mid:<number>|<string>manga to retrieve data of.
Returns Promise<json, heads>
getChapter(cid)
cid:<number>|<string>chapter to retrieve data of.
Returns Promise<json, heads>
getFullURLs(cid)
cid:<number>|<string>chapter to retrieve pages of.
Returns Promise<{pipe, pageURLs, cid}, err>
getImages(fout, iin)
fout:<string>directory to put images intoiin:<number>|<Object{cid}>cid to request
getConnection(service)
service:<string>|<URL>to connect to.
