proclubs-api
v0.0.17
Published
[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
Downloads
22
Maintainers
Readme
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 that uses this repo and is based on React, NextJS, Material-UI and Redis.
Targeting ESnext - Tested with node >= v15.3.0
because i ❤ Optional chaining
Installing from source
Linux, MacOS, Windows, *BSD, Solaris, WSL, Android, Raspbian
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');
Contributing
Contributors and committers are welcome.
Made with ❤ by
- Nicolas Taboada (Javascript developer)
- E-mail: [email protected]
- StackOverflow: nicolas-taboada
License
MIT license. Copyright © 2018.