/khan-api

A Khan Academy API client for Node.js and the browser

Primary LanguageTypeScriptMIT LicenseMIT

NPM version Platform support Try @bhavjit/khan-api on RunKit

A Khan Academy internal API client and wrapper for Node.js and the browser.

Quick links

Install

Node.js

npm i @bhavjit/khan-api
yarn add @bhavjit/khan-api

Usage

Node.js

JavaScript modules

import { Client } from '@bhavjit/khan-api'

const client = new Client()

CommonJS

const { Client } = require('@bhavjit/khan-api')

const client = new Client()

Web

JavaScript modules

<script type="module">
  import { Client } from 'https://esm.run/@bhavjit/khan-api'

  const client = new Client()
</script>

Script tag

<script src="https://cdn.jsdelivr.net/npm/@bhavjit/khan-api"></script>
<script>
  const client = new KhanAPI.Client()
</script>

See the examples directory for more.