1.1.3 • Published 5 years ago

@hackmcgill/hackerapi-client-ts v1.1.3

Weekly downloads
-
License
ISC
Repository
github
Last release
5 years ago

hackerAPI-client-ts

Typescript client for hackerAPI.

Installation

To install, use npm:

npm install hackerapi-client-ts

Usage

At the entry-point of your code, you must provide the endpoint of the API:

import { api as API } from '@hackmcgill/hackerapi-client-ts';
API.setURL('https://api.mchacks.ca');

Afterwards, you can use whichever resource you would like. For example, you can create an Account as such:

import { Account } from '@hackmcgill/hackerapi-client-ts';
Account.create({
  accountType: UserType.HACKER;
  confirmed: true;
  firstName: 'John';
  lastName: 'Doe';
  email: 'john.doe@mchacks.ca';
  dietaryRestrictions: ['Halal', 'Vegetarian'];
  shirtSize: ShirtSize.XL;
  password: 'hunter2';
  phoneNumber: '1234567889';
  birthDate: '2008-09-15T15:53:00';
  pronoun: 'He / him';
  id: '';
});
1.1.3

5 years ago

1.1.0

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago