Versions

The versions API can be used to list available versions of a book (branches, tags or commits). The Contents API can then be used to fetch files for a specific version.

See Format for details about the version object format.

The Versions plugins can be enabled to list versions of the book in the sidebar.

List branches

This method returns the list of active branches in the book's git repository.

GET /book/:author/:book/versions/branches

List tags

This method returns the list of Git tags in the book's git repository.

GET /book/:author/:book/versions/tags

List languages

For multilingual book, this method returns the list of languages.

GET /book/:author/:book/versions/languages

Version Format

Each version (Tag, Branch or Language) is represented by a version object.

The current is set to true when its represent the main version (current branch, current language, etc).

{
    "name": "master",
    "urls": {
        "website": "https://samypesse.gitbooks.io/how-to-create-an-operating-system/content/",
        "epub":    "https://www.gitbook.com/download/epub/book/samypesse/how-to-create-an-operating-system/",
        "pdf":     "https://www.gitbook.com/download/pdf/book/samypesse/how-to-create-an-operating-system/",
        "mobi":    "https://www.gitbook.com/download/mobi/book/samypesse/how-to-create-an-operating-system/"
    },
    "current": true
}

results matching ""

    No results matching ""