# proclubs-api

> [PipelineStatusBadge]: https://gitlab.com/firstTerraner/proclubs-api/badges/main/pipeline.svg [CoverageBadge]: https://gitlab.com/firstTerraner/proclubs-api/badges/main/coverage.svg [ProjectUrl]: https://gitlab.com/firstTerraner/proclubs-api/commits/mai

Latest version **0.0.17** (published 2022-02-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install proclubs-api
pnpm add proclubs-api
yarn add proclubs-api
bun add proclubs-api
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.17 |
| Published | 2022-02-04 |
| First published | 2021-09-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 69.9 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| Author | FirstTerraner |
| Maintainers | first-terraner |
| Keywords | api, fifa, easports, nodejs |

## Links

- npm: https://www.npmjs.com/package/proclubs-api
- Repository: https://gitlab.com/FirstTerraner/proclubs-api
- Homepage: https://gitlab.com/FirstTerraner/proclubs-api/-/blob/main/README.md
- Issues: https://gitlab.com/FirstTerraner/proclubs-api/issues
- npm.io page: https://npm.io/package/proclubs-api

## Dependencies (1)

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

## Recent versions

- 0.0.17 (latest) — 2022-02-04
- 0.0.13 — 2021-11-15
- 0.0.12 — 2021-10-17
- 0.0.10 — 2021-10-01
- 0.0.9 — 2021-10-01
- 0.0.8 — 2021-09-30
- 0.0.7 — 2021-09-27
- 0.0.6 — 2021-09-24
- 0.0.5 — 2021-09-23
- 0.0.4 — 2021-09-11
- 0.0.2 — 2021-09-11
- 0.0.1 — 2021-09-11
- 0.0.1-test — 2021-09-11

## README

[PipelineStatusBadge]: https://gitlab.com/firstTerraner/proclubs-api/badges/main/pipeline.svg
[CoverageBadge]: https://gitlab.com/firstTerraner/proclubs-api/badges/main/coverage.svg
[ProjectUrl]: https://gitlab.com/firstTerraner/proclubs-api/commits/main
[ProjectPage]: https://firstTerraner.gitlab.io/proclubs-api


[![pipeline status][PipelineStatusBadge]][ProjectUrl]
[![coverage report][CoverageBadge]][ProjectUrl]
## Fifa Pro Clubs API built on NodeJS/ES6 ##

Wrapper to get stats for **FIFA Pro Clubs teams, players and matches**.

Visit an open source pro clubs [web-app](https://virtualpro.space) that uses this repo and is based on React, NextJS, Material-UI and Redis.

[Web-app source code](https://firstTerraner.gitlab.io/proclubs-api)

[Proclubs-api Docs](https://firstTerraner.gitlab.io/proclubs-api)

## Targeting **ESnext** - Tested with node **>=** v**15.3.0**
because i ❤ [Optional chaining](https://2ality.com/2019/07/optional-chaining.html)

## Installing from source

### Linux, MacOS, Windows, *BSD, Solaris, WSL, Android, Raspbian

```bash
git clone https://gitlab.com/firstTerraner/proclubs-api.git
cd proclubs-api
npm i
npm start

# run tests
npm test

# build docs
npx typedoc $(find 'src' -type f -name '*.ts' -not -name '*.test.ts' -printf "%p ") --out docs


```


That's it!



## How to use

After you install the package, you can include **proclubs-api** within your code such this:

```
const proClubsApi = require('proclubs-api`);
```

You can also import the functions like this (ES6):

```
import { getClubSearch } from 'proclubs-api/dist/core/club'
```

### Clubs

Note: All endpoints need a platform parameter.

Supported platforms written as follow: ps4, ps5, xboxone, xbox-series-xs, pc

platform: TPlatformType
name: string
clubId: number

We can perform different operations according clubs:

- getClubSearch(platform, name)
- getClubIdByName(platform, name)
- getClubMembers(platform, clubId)
- getClubMemberStats(platform, clubId)
- getClubStats(platform, clubId)
- getClubMatchHistory(platform, clubId, gameType)
- getClubInfo(platform, clubId)

Example:

```
const resp = await getClubInfo('ps4', 13607);
```

The parameter gameType accepts 2 types:
'matchType9' & 'matchType13' (9 for division & 13 for cup)

### Leaderboard

We can perform different operations according leaderboard:

-  getOverallLeaderboard('ps4')
-  getSeasonLeaderboard('ps5')

Example:

```
const resp = await getOverallLeaderboard('ps4');
```

<!-- ### Members -->

<!-- We can perform different operations according players/members:

-  getMembersClubStats(clubId, blazeId)
-  getMembersStats(blazeId) -->


<!-- _getMembersClubStats_  retrieves actual data of a player inside a club. This operation require a **_clubId_** and **_blazeId_** (playerId) as parameters.

_getMembersStats_ retrieves individual data of a player. This operation require a **_blazeId_** (playerId) as parameter.


Example:

```
const resp = await member.getMembersClubStats('13607', 'rE4p14Gj8KOtkGq63eL8mA!!:BrUy43tm4sv8Qz5jmZvGkg!!');
``` -->

<!-- ### Settings

- getSettings()


Example:

```
const resp = await settings.getSettings();
``` -->


## Contributing

Contributors and committers are welcome.


## Made with ❤ by

- Nicolas Taboada (Javascript developer)
- E-mail: ntaboada93@gmail.com
- StackOverflow: nicolas-taboada


## License

MIT license. Copyright © 2018.

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