# nyrr-results-api

> #### Installation ``` npm install nyrr-results-api ```

Latest version **2.2.0** (published 2023-05-05) · ISC license · 0 weekly downloads

## Install

```sh
npm install nyrr-results-api
pnpm add nyrr-results-api
yarn add nyrr-results-api
bun add nyrr-results-api
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.2.0 |
| Published | 2023-05-05 |
| First published | 2022-09-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 67.3 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| Author | Ted Brakob |
| Maintainers | tedbrakob |

## Links

- npm: https://www.npmjs.com/package/nyrr-results-api
- npm.io page: https://npm.io/package/nyrr-results-api

## Dependencies (2)

- [zod](https://npm.io/package/zod.md) ^3.19.1
- [axios](https://npm.io/package/axios.md) ^0.27.2

## Recent versions

- 2.2.0 (latest) — 2023-05-05
- 2.1.0 — 2023-03-05
- 2.0.0 — 2023-03-05
- 1.0.11 — 2023-01-14
- 1.0.10 — 2022-12-27
- 1.0.9 — 2022-09-30
- 1.0.8 — 2022-09-28
- 1.0.7 — 2022-09-28
- 1.0.6 — 2022-09-28
- 1.0.5 — 2022-09-28
- 1.0.4 — 2022-09-28
- 1.0.3 — 2022-09-21
- 1.0.2 — 2022-09-21
- 1.0.1 — 2022-09-17
- 1.0.0 — 2022-09-10

## README

# nyrr-results-api

#### Installation
```
npm install nyrr-results-api
```

#### Example Usage
```
import NyrrApi from "nyrr-results-api";

...
...
...

//get team results for the Men's "A" division in 2022
const divisionResults = await NyrrApi.getDivisionResults("AM", 2022);
```

### Available functions
All functions of `NyrrApi` return a promise that resolves to a value described below:

* `getYears()`
  * Get the list of years with team standings available.
* `getDivisionsResults(year:number)`
  * Get a list of all divisions with team standings for a given year
* `getTeams(year:number)`
  * Get a list of all teams available for a given year
* `getDivisionResults(divisionCode:string, year:number)`
  * Get a list of team results for a given division and year.  This includes team points for each race
* ```
  getTeamAwards(
    eventCode:string, 
    teamCode:string, 
    gender:string | null = null, 
    minimumAge:number | null = null
  )
  ```
  * Get a list of team results for a given division and year.  This includes team points for each race
  * This endpoint accepts a gender and minimum age rather than a division code.  For example, to get the team's open men division, pass `gender = "M"` and `minimumAge = 0`.
* ```
  getTeamAwardRunners(
    eventCode:string, 
    teamCode:string, 
    teamGender:string | null = null, 
    teamMinimumAge:number | null = null
  )
  ```
  * Get a list of team results for a given division and year.  This includes team points for each race
  * This endpoint accepts a gender and minimum age rather than a division code.  For example, to get the team's open men division, pass `teamGender = "M"` and `teamMinimumAge = 0`.
* ```
  searchEvents(
    year:number | null = null, 
    searchString:string = "", 
    distance: string | null = null, 
  )
  ```
  * Get a list of all past events matching the search parameters

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