List one page of a series' chapters from a source
const url = 'http://localhost:8080/api/v1/me/extensions/example/chapters?seriesId=example&order=asc&offset=0&limit=100&refresh=false';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://localhost:8080/api/v1/me/extensions/example/chapters?seriesId=example&order=asc&offset=0&limit=100&refresh=false' \ --header 'Authorization: Bearer <token>'Sites often list a chapter once per group that released it, so the server groups releases by chapter number and answers one item per chapter, with every release of it and one picked: the release from the user’s preferred group for the series (see setRemoteReleaseGroup), else an official one, else the newest. Releases without a plain number, such as extras, are chapters of their own, and 12.5 is never folded into 12.
Positions count releases, not chapters, since that’s what sources page by. A page holds up to limit chapters from offset, counted from the first chapter (asc, reading order) or the newest (desc); ask for the next page at nextOffset, which is null at the end. A page may hold fewer than limit chapters before the end, so don’t infer the end from its size. total counts releases; chapterCount counts chapters when the server has read the whole list, and is null when the extension pages the list itself.
An extension that pages chapters itself is asked for just the releases a page needs. Otherwise the server reads the whole list from the source on the first request and keeps it for ten minutes, so later pages, either order, are answered without asking the source again; refresh reads it from the source again. Answers may be cached by the client for ten minutes (Cache-Control).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The extension’s reverse-DNS id.
Query Parameters
Section titled “Query Parameters”The source’s own series id.
The release position to start at: 0, or a nextOffset from an earlier page in the same order.
A release id; the page starts just past the chapter that release belongs to, in the chosen order, instead of at offset, and offset in the answer says where. Not found when the series has no such release.
A BCP 47 tag. Only releases in this language, or a narrower or wider form of it (en takes en-US), are listed, along with releases whose language the source doesn’t give. Chapters with no such release are left out.
Read the list from the source again rather than the kept copy.
Responses
Section titled “Responses”One page of chapters, where it starts and where the next one does.
object
A chapter: the fields of its picked release, and all its releases with the picked one first.
object
The source’s own id for this release; open it with listRemotePages.
The chapter or volume number as the source writes it.
Changes when the release’s pages change. A content revision only; who released it is releaseGroup.
An RFC 3339 date or date-time.
The BCP 47 tag of the language the release is written in, or null when the source doesn’t say.
Who released it, such as a scanlation group or a publisher.
Whether the series’ publisher released it.
object
The source’s own id for this release; open it with listRemotePages.
The chapter or volume number as the source writes it.
Changes when the release’s pages change. A content revision only; who released it is releaseGroup.
An RFC 3339 date or date-time.
The BCP 47 tag of the language the release is written in, or null when the source doesn’t say.
Who released it, such as a scanlation group or a publisher.
Whether the series’ publisher released it.
The release position the page starts at.
The offset of the next page, or null at the end.
How many releases the series has.
How many chapters the series has in the requested language, or null when the extension pages its list and the server hasn’t read all of it.
The user’s preferred release group for this series.
Example generated
{ "items": [ { "id": "example", "title": "example", "number": "example", "version": "example", "published": "example", "language": "example", "releaseGroup": "example", "official": true, "releases": [ { "id": "example", "title": "example", "number": "example", "version": "example", "published": "example", "language": "example", "releaseGroup": "example", "official": true } ] } ], "offset": 1, "nextOffset": 1, "total": 1, "chapterCount": 1, "preferredGroup": "example"}The request was malformed.
object
Explains the problem to a developer.
Example
{ "code": "bad_request"}The request has no valid session token.
object
Explains the problem to a developer.
Example
{ "code": "bad_request"}The signed-in user may not do this. demo_account when the user is a
shared demo account, named in CHEK_DEMO_USERS, which can’t change
its password, sessions, sign-in providers, extensions or annotations.
object
Explains the problem to a developer.
Example
{ "code": "bad_request"}The resource does not exist.
object
Explains the problem to a developer.
Example
{ "code": "bad_request"}The server failed; details are in its log.
object
Explains the problem to a developer.
Example
{ "code": "bad_request"}The extension reported an error, went over a limit, or the image couldn’t be fetched.
object
Explains the problem to a developer.
Example
{ "code": "bad_request"}