Skip to content

thanhtoan1196/kahoot-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kahoot API

An API for the kahoot.it quiz platform. Includes Will include all the features of kahoot-tools

Installation

Install with npm or yarn

yarn add kahoot-api
# or
npm install kahoot-api

Usage

To get you started, here is a basic example of the Player authentication flow:

import { Session, Player } from 'kahoot-api';

const session = new Session(/** optional cors proxy, url string */)
session.check(123456) //Get pin info
  .then(info => session.connect)
  .then(socket => {
    const player = new Player(socket); //Create player class
    player.join('test'); //Join with name
    player.on('status', (message) => { //Listen to status messages
        if (message.data.status === 'ACTIVE') { //If session active
          console.log('Success!');
        }
    });
  });

For usage please refer to the documentation (WIP, probably old)

Contributing

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.

License

MIT

About

An API for the Kahoot quiz service

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%