lorenzh / fut-api

Ultimate Team API - FIFA 16 - unofficial
MIT License
53 stars 12 forks source link

fut-api - FIFA 17 - unofficial

NPM

Usage

Create a new instance

var futapi = require("fut-api");
var apiClient = new futapi([options]);
Options

Login


  function twoFactorCodeCb(next){
      /* send your authentication code with the "next" method */
      next("123456");
  }

    apiClient.login("username","password","secret", "platform",
        twoFactorCodeCb,
        function(error,response){
        if(error) {
            return console.log("Unable to login.");
        }
        console.log("logged in.");

        apiClient.getCredits(function(error, response){ });

    });

Credits

  apiClient.getCredits(function(error, response){ });

Pilesize

  apiClient.getPilesize(function(error, response){ });

Tradepile

  apiClient.getTradepile(function(error, response){ });

Relist tradepile

  apiClient.relist(function(error, response){ });

Watchlist

  apiClient.getWatchlist(function(error, response){ });

Transfermarket

  apiClient.search({type: "player", lev: "gold", maskedDefId: 183907, pos: "CB" }, function(error, response){ });

Place bid

  apiClient.placeBid(tradeId, coins, function(error, response){ });

List item

  apiClient.listItem(itemDataId, startingBid, buyNowPrice, duration, function(error, response){ });

Auction status

  apiClient.getStatus([tradeIds], function(error, response){ });

Add to watchlist

  apiClient.addToWatchlist(tradeId, function(error){ });

remove from tradepile

  apiClient.removeFromTradepile(tradeId, function(error){ });

remove from watchlist

  apiClient.removeFromWatchlist(tradeId, function(error){ });

send to tradepile

  apiClient.sendToTradepile(itemDataId, function(error, response){ });

send to tradepile

  apiClient.sendToClub(itemDataId, function(error, response){ });

Quick sell

  apiClient.quickSell(itemDataId, function(error, response){ });

Functions

Validate price/coins

    futapi.isPriceValid(coins);

returns true or false

Calculate valid price/coins

    futapi.calculateValidPrice(coins);

returns valid coins amount

Calculate next lower price/coins

    futapi.calculateNextLowerPrice(coins);

returns next lower coins after calculating valid price

Calculate next higher price/coins

    futapi.calculateNextHigherPrice(coins);

returns next higher coins after calculating valid price