# uhunt-node

> Get information of exercises from UVA Judge and uHunt.

Latest version **1.0.4** (published 2017-03-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install uhunt-node
pnpm add uhunt-node
yarn add uhunt-node
bun add uhunt-node
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2017-03-14 |
| First published | 2017-03-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | @anlijudavid |
| Maintainers | anlijudavid |
| Keywords | uhunt, uhunt-node, coding, programming, excercises |

## Links

- npm: https://www.npmjs.com/package/uhunt-node
- Repository: https://github.com/juliandavidmr/uhunt-node
- Homepage: https://github.com/juliandavidmr/uhunt-node#readme
- Issues: https://github.com/juliandavidmr/uhunt-node/issues
- npm.io page: https://npm.io/package/uhunt-node

## Dependencies (2)

- [axios](https://npm.io/package/axios.md) ^0.15.3
- [moment](https://npm.io/package/moment.md) ^2.17.1

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads
- [datasets-fi-postalcodes](https://npm.io/package/datasets-fi-postalcodes.md) — 1.1K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2017-03-14
- 1.0.3 — 2017-03-12
- 1.0.2 — 2017-03-12
- 1.0.1 — 2017-03-11
- 1.0.0 — 2017-03-11

## README

# uhunt

Get information of exercises from UVA Judge and uHunt.

API Public: *http://uhunt.felix-halim.net/api*

## Install
```js
$ npm install uhunt --save
```

## Use

### Specific problem
```js
// Get by id excercise
uhunt.byId(161).then((data) => {
    console.log(data);
/* =>
{ pid: 161,
  num: 225,
  title: 'Golygons',
  ce: 98,
  re: 164,
  tle: 297,
  mle: 1,
  wa: 1077,
  ac: 618,
  rtl: 3000,
  ... }
*/
}, error => {
    console.log(error);
})
```

```js
// Get by number excercise
uhunt.byNum(100).then((data) => {
    console.log(data);
/* =>
{ pid: 36,
  num: 100,
  title: 'The 3n + 1 problem',  
  ce: 113277,
  re: 68349,
  ole: 323,
  tle: 59086,
  mle: 5209,
  wa: 275293,
  pe: 5049,
  ac: 195269,
  rtl: 3000,
  ... }
*/
}, error => {
    console.log(error);
})
```

### User submissions
```js
// Get data submissions from any user 
uhunt.getUserSubmission(339).then((data) => {
    console.log(data);
}, error => {
    console.log(error);
})
```

### Problem List
Returns the list of problems at UVa in array format.
```js
// Get list excersices
uhunt.list().then((data) => {
    console.log(data);
}, error => {
    console.log(error);
})
```

### Submissions to Specific Problems

To view submissions to specific problems on a given submission date range. Note that the submissions are returned in no particular order.
```js
uhunt.listSubmSpecificProblem([1342, 2702, 1700], new Date(2004, 12, 15), Date.now()).then((data) => {
    console.log(data);
/*
[{  sid: 3308738,
    uid: 1137,
    pid: 1342,
    ver: 50,
    lan: 3,
    run: 10096,
    mem: 0,
    rank: -1,
    sbt: 1108576139,
    name: 'Hubert Hwang',
    uname: 'antimatter' },
  ...
]
*/
}, error => {
    console.log("ERROR", error);
})
```

### _In progress_

Author: [@anlijudavid](https://github.com/juliandavidmr/)

**Pull requests accepted**

Licence MIT

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