https://github.com/knighthacks/api-node
The Knight Hacks Node.js API wrapper.
https://github.com/knighthacks/api-node
backend typescript
Last synced: 24 days ago
JSON representation
The Knight Hacks Node.js API wrapper.
- Host: GitHub
- URL: https://github.com/knighthacks/api-node
- Owner: KnightHacks
- License: mit
- Created: 2021-07-27T23:57:03.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-11-06T03:13:46.000Z (over 4 years ago)
- Last Synced: 2025-07-29T22:37:02.151Z (11 months ago)
- Topics: backend, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@knighthacks/hackathon
- Size: 2.03 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# KnightHacks Node API
This package provides a simple interface for interacting with the knighthacks backend
### Getting up and running is easy:
```ts
import { API } from '@knighthacks/hackathon';
// Create api instance.
const api = new API();
```
### Example: Fetch Club Events
```ts
const clubEvents: ClubEvent[] = await api.club.getEvents();
// Dates are automatically serialized.
console.log(clubEvents[0].start.toLocaleString());
```
### Example: Manipulate Hacker Data
```ts
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,
});
```