An API for the kahoot.it quiz platform. This release is intended for educational purposes only. The API is pretty outdated and I won't be supporting it any longer. It's still a good source for anyone looking to unravel the inner workings of Kahoot.
Install with npm or yarn
yarn add kahoot-api
# or
npm install kahoot-api
To get you started, here is a basic example of the Player authentication flow:
import { Session, Adapters } from 'kahoot-api';
const session = new Session(000000 /** pin */, /** optional cors proxy, url string */)
session.openSocket() //Connect
.then(socket => {
const player = new Adapters.Player(socket); //Create player class
player.join('test') //Join with name
.then(() => {
console.log('Success!');
});
});
For usage please refer to the documentation
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.