# hackry

> Hackry API wrapper

Latest version **2.0.0** (published 2018-03-02) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install hackry
pnpm add hackry
yarn add hackry
bun add hackry
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2018-03-02 |
| First published | 2017-08-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 26.6 KB |
| Known vulnerabilities | 0 (+24 in 1 direct dependencies) |
| Install scripts | no |
| Author | Hackry |
| Maintainers | jmousseau |
| Keywords | Hackry, hackathons, api |

## Links

- npm: https://www.npmjs.com/package/hackry
- Repository: https://github.com/HackryHQ/Hackry-SDK-JS
- Homepage: https://github.com/HackryHQ/Hackry-SDK-JS#readme
- Issues: https://github.com/HackryHQ/Hackry-SDK-JS/issues
- npm.io page: https://npm.io/package/hackry

## Dependencies (1)

- [axios](https://npm.io/package/axios.md) ^0.18.0

## Recent versions

- 2.0.0 (latest) — 2018-03-02
- 1.3.1 — 2018-02-11
- 1.3.0 — 2018-02-11
- 1.2.0 — 2018-02-01
- 1.1.1 — 2018-01-21
- 1.1.0 — 2018-01-18
- 1.0.1 — 2017-08-27
- 1.0.0 — 2017-08-27

## README

# Hackry JavaScript Library
![Build Status][build]
![Coverage Status][coverage]

The Hackry JavaScript Library wraps the [Hackry](https://hackry.io) REST API for
server-side and client-side use. No secrets or other credentials are ever
exchanged using this library since all API endpoints interfaced are public.

## Documentation

See the [Hackry REST API Docs][docs].

## Installation
Using npm:
```bash
$ npm install hackry
```

Using CDN:
```html
<script src="https://unpkg.com/hackry"></script>
```

## Usage

Instantiate a `Hackry` object with your hackathon id, located in the Home
section of the dashboard.
```js
const hackry = new Hackry('<hackathon-id>', {
  // Defaults to true. Set to false for server-side use.
  cache: false
});

// Get the attendee registration URL for your hackathon.
hackry.registrationURL();
```
All hackathon resources have a corresponding method for fetching. Some methods
will sort resources to guarantee ordering.

The `announcements` and `events` methods take an optional query params object
that allows you to format their date response properties according to a
[Moment.js format string](https://momentjs.com/docs/#/displaying/format/).

### Announcements
Sorted by `updatedAt` in ascending order.
```js
hackry.announcements(function(err, announcements) {

});

// Format updatedAt property with Moment.js format string.
hackry.announcements({
  timeZone: 'America/New_York',
  updatedAtFormat: 'dddd h:mm a'
}, function(err, announcements) {
  // Each announcement has updatedAtFormatted property.
});
```

### Day of Contacts
Not sorted.
```js
hackry.dayOfContacts(function(err, dayOfContacts) {

});
```

### Events
Sorted by `startDate` in ascending order.
```js
hackry.events(function(err, events) {

});

// Format startDate and/or endDate properties with Moment.js format strings.
hackry.events({
  timeZone: 'America/New_York',
  startDateFormat: 'dddd h:mm a',
  endDateFormat: 'h:mm a'
}, function(err, events) {
  // Each event now has startDateFormatted and endDateFormatted properties.
});
```

### FAQs
Sorted by `position` in ascending order
```js
hackry.faqs(function(err, faqs) {

});
```

## Troubleshooting

If no resources are returned by a method without an error occuring, make sure
you have at least one resource populated in your dashboard __with visibility
turned on__. As explained in the [documentation][docs], only objects with an
enabled visibility/availability will be delivered.

### Contact Us

Please send any questions or feature requests to <mailto:support@hackry.io>.

[build]: https://img.shields.io/travis/HackryHQ/Hackry-SDK-JS.svg
[coverage]: https://img.shields.io/codecov/c/github/HackryHQ/Hackry-SDK-JS.svg
[docs]: https://hackry.io/docs

---
_Source: https://npm.io/package/hackry · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
