# fantasydata-node-client

> Node.js SDK to interface with FantasyData APIs

Latest version **1.8.2** (published 2024-10-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install fantasydata-node-client
pnpm add fantasydata-node-client
yarn add fantasydata-node-client
bun add fantasydata-node-client
```

## 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.8.2 |
| Published | 2024-10-29 |
| First published | 2018-04-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 676.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | FantasyData |
| Maintainers | fantasydata |
| Keywords | fantasydata |

## Links

- npm: https://www.npmjs.com/package/fantasydata-node-client
- npm.io page: https://npm.io/package/fantasydata-node-client

## Recent versions

- 1.8.2 (latest) — 2024-10-29
- 1.8.1 — 2024-09-20
- 1.8.0 — 2024-09-20
- 1.7.0 — 2024-01-18
- 1.6.0 — 2023-04-17
- 1.5.3 — 2021-11-12
- 1.5.2 — 2021-10-11
- 1.5.1 — 2021-08-27
- 1.5.0 — 2021-08-11
- 1.4.0 — 2021-03-24
- 1.3.4 — 2020-06-04
- 1.3.3 — 2020-03-13
- 1.3.0 — 2020-02-26
- 1.2.1 — 2018-10-19
- 1.2.0 — 2018-10-18
- … 2 more at https://npm.io/package/fantasydata-node-client/versions

## README

# fantasydata-api-node
[SportsDataIO](https://sportsdata.io) API client (formerly branded as FantasyData) library wrapper for Node. For more information on the SportsDataIO API check the [SportsDataIO Developer Portal](https://sportsdata.io/developers). There are no external dependencies for this package aside from [node](https://nodejs.org/).

## Installation
This library is distributed on `npm`. In order to add it as a dependency, run the following command:

``` sh
$ npm install --save fantasydata-node-client
```

## Authentication
You can find your api keys in the [SportsDataIO Developer Portal](https://sportsdata.io/developers). See [Usage](#usage) for implementation details.

## Usage
In this simple example we authenticate two clients, `MLBv3Stats` and `MLBv3Projections`, with their respective keys. We then pull standings for `2023` and do whatever we need to with the JSON returned.
``` js
const fdClientModule = require('fantasydata-node-client');
const keys = {
    'MLBv3StatsClient':'YOUR-MLBV3STATS-KEY',
    'MLBv3ProjectionsClient':'YOUR-MLBV3PROJECTIONS-KEY'
};
const FantasyDataClient = new fdClientModule(keys);
    
FantasyDataClient.MLBv3StatsClient.getStandingsPromise('2023')
    .then((resp) => {
        // data here
    })
    .catch((err) => {
        // handle errors
    });
```

## Documentation
* [SportsDataIO Developer Portal](https://sportsdata.io/developers)
* [Odds API](https://sportsdata.io/live-odds-api)
* [Data Dictionary](https://sportsdata.io/developers/data-dictionary/nfl)

 API Documentation                                                                 |
|----------------------------------------------------------------------------------------|
| [NFL API](https://sportsdata.io/developers/api-documentation/nfl)                      |
| [MLB API](https://sportsdata.io/developers/api-documentation/mlb)                      |
| [NBA API](https://sportsdata.io/developers/api-documentation/nba)                      |
| [NHL API](https://sportsdata.io/developers/api-documentation/nhl)                      |
| [NCAA Football API](https://sportsdata.io/developers/api-documentation/ncaa-football)  |
| [NCAA Basketball API](https://sportsdata.io/developers/api-documentation/ncaa-basketball) |
| [PGA / Golf API](https://sportsdata.io/developers/api-documentation/golf)                |
| [NASCAR API](https://sportsdata.io/developers/api-documentation/nascar)                |
| [Soccer API](https://sportsdata.io/developers/api-documentation/soccer)                |
| [UFC / MMA API](https://sportsdata.io/developers/api-documentation/mma)                      |
| [WNBA API](https://sportsdata.io/developers/api-documentation/wnba)                    |
| [NCAA Women's Basketball API](https://sportsdata.io/developers/api-documentation/ncaa-womens-basketball) |
| [Tennis API](https://sportsdata.io/developers/api-documentation/tennis)                |
| [LoL API](https://sportsdata.io/developers/api-documentation/lol)                      |
| [CS:GO API](https://sportsdata.io/developers/api-documentation/csgo)                   |

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