1.1.3 • Published 6 years ago

fut.js v1.1.3

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

Build Dependencies npm version

Fut.js

npm


A Simple but powerful tool to access the FIFA Ultimate Team player database with the ability to grab the stats or the price range for any player.

New: Added getPrice() function, see docs.


Full documentation

getPlayer(name: string, clean: boolean): Returns: Array[Object]

  • Name: String, the name of the player you would like to search for.
  • Clean: Boolean, (optional, defaults to true), if true the function returns an array with some of the useless stuff striped away into a neater format, if false the function just returns the raw JSON data.

Example:

const fut = require('fut.js');

/* In an ES7 async function */
const somefunction = async () => {
  const players = await fut.getPlayer('Messi', true);
  return console.log(`${players[0].name} | ${players[0].overall}`);
};

/* ES5 Promise */
fut.getPlayer('Messi', true).then((players) => {
  return console.log(`${players[0].name} | ${players[0].overall}`);
}).catch((err) => {
  return console.error(err);
});

getPrice(id: string): Returns: Object

  • Id: String, has to be a numerical string (ie: '69420'), the id of a player which can be grabbed via the getPlayer() function, see the example below.

Example:

const fut = require('fut.js');

const somefunction = async () => {
  const player = await fut.getPlayer('Messi', true);
  const price = await fut.getPrice(player[0].info.id);

  console.log(`Price for ${player.info.name} on xbox is around: ${price.xbox.min}`);
};
1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago