Learn more about the Kotobee Reader API and how to start using it.

For advanced users, you can control different aspects of the reader using the Kotobee Reader API. This is a Javascript library made available to you through any of your ebook chapters, which will let you leverage functions already provided by the reader. This library is useful in the following cases:

  • You want to build a scalable ebook app.
  • You want to provide your own ebook navigation controls.
  • You want to store user data on the server easily.
  • You want to achieve a level of customization not easy achievable with CSS.

Different methods, properties, and events are provided. The methods provided are divided into 5 categories.

UI Methods

These methods are used to interact with the reader's different UI elements and components.

Content Methods

These methods are used to display/set content in different ways.

Navigation Methods

These methods are used mainly to navigate to different chapters efficiently.

SCORM / Tin Can Methods

These methods are used to send progress to an LMS or LRS.

Cloud Methods

These methods are used to store and retrieve user data into the database, for that cloud ebook or library. These methods are available for logged in users only.

Events

These are event types that you can listen to, in order to call particular functions when your user has interacted with your ebook in a particular way, such as going to a new chapter, or playing a video, etc.

How to Use

When opening any ebook app in the browser, open the web inspector (aka DevTools) using F12 or Ctrl+Shift+i keyboard shortcut. The API is accessible through the variable "kotobee" which is available to you at startup.

In the console tab, type in "kotobee.documentation" and hit Enter. You will see a complete documentation of all methods, properties, and events.