@knighthacks/hackathon
TypeScript icon, indicating that this package has built-in type declarations

0.1.0-dev-d1c83c6 • Public • Published

KnightHacks Node API

This package provides a simple interface for interacting with the knighthacks backend

Getting up and running is easy:

import { API } from '@knighthacks/hackathon';

// Create api instance.
const api = new API();

Example: Fetch Club Events

const clubEvents: ClubEvent[] = await api.club.getEvents();

// Dates are automatically serialized.
console.log(clubEvents[0].start.toLocaleString());

Example: Manipulate Hacker Data

const hacker = await api.hackers.get('Bob');

await hacker.setLastName('Joe');
await hacker.setSharingInfo(true);

// Or use a bulk edit...

await hacker.edit({
  lastName: 'Joe',
  canShareInfo: true,
});

Readme

Keywords

none

Package Sidebar

Install

npm i @knighthacks/hackathon

Weekly Downloads

3

Version

0.1.0-dev-d1c83c6

License

MIT

Unpacked Size

67.7 kB

Total Files

42

Last publish

Collaborators

  • suneettipirneni
  • rob-3