An open API service indexing awesome lists of open source software.

https://github.com/bhavjitchauhan/khan-api

A Khan Academy API client for Node.js and the browser
https://github.com/bhavjitchauhan/khan-api

api khan-academy

Last synced: 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

# [Khan API](https://khan-api.bhavjit.com "Khan API website")

[![NPM version](https://img.shields.io/npm/v/@bhavjit/khan-api)](https://www.npmjs.com/package/@bhavjit/khan-api?activeTab=versions)
![Platform support](https://img.shields.io/node/v/@bhavjit/khan-api)
[![Try @bhavjit/khan-api on RunKit](https://badge.runkitcdn.com/@bhavjit/khan-api.svg)](https://npm.runkit.com/@bhavjit/khan-api)

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

Quick links

- [Documentation](https://khan-api.bhavjit.com "Khan API library documentation")
- [Reference](https://khan-api.bhavjit.com/reference "Khan internal API reference")
- [Safelist](https://github.com/bhavjitChauhan/khan-api/tree/safelist "Khan Academy safelisted GraphQL queries")
- [Proxy](https://github.com/bhavjitChauhan/khan-api/tree/proxy "Khan Academy API CORS proxy")

## Install

### Node.js

#### [NPM](https://www.npmjs.com/package/@bhavjit/khan-api)

```bash
npm i @bhavjit/khan-api
```

#### [Yarn](https://yarn.pm/@bhavjit/khan-api)

```bash
yarn add @bhavjit/khan-api
```

## Usage

### Node.js

#### JavaScript modules

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

const client = new Client()
```

#### CommonJS

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

const client = new Client()
```

### Web

#### JavaScript modules

```html

import { Client } from 'https://esm.run/@bhavjit/khan-api'

const client = new Client()

```

#### Script tag

```html

const client = new KhanAPI.Client()

```

See the [examples](examples) directory for more.