lorenzh / fut-api

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

Asking for an example as I don't get anything but login #22

Open moisty70 opened 7 years ago

moisty70 commented 7 years ago

First thanks for the project.

I am trying to get some results with no success. I can just login.

getStatus, getTradepile, search... nothing seems to send a response as shown in the readme file.

Could someone send an example of a search, for example silver players with position ST.

I suppose its something like this: apiClient.search({type: "player", lev: "silver", pos: "ST" }, function(error, response){ });

but... ¿How I get to the players list?

pjar commented 7 years ago

Once you successfully logged in you can do something like:

apiClient.search({num: 48, type: "player", lev: "silver", pos: "ST"}, function(error, response){ 
    if (!response.auctionInfo) {
      // Return full response to see why there are no auctions
      console.log(response);
      return;
    } else {
       // Return auction entries when it's successful
       console.log(response.auctionInfo);
    }
};
moisty70 commented 7 years ago

thanks. got it working. i will wake up in the morning with 200000 more coins very soon.

next test I will do is to put all this in a loop to check every 30 seconds. can EA ban a user for doing this?

aphrs commented 7 years ago

What's your method ? Do you only place bid ?

moisty70 commented 7 years ago

my method for players needed for SBC will be place bid. for consumables like healing or squad training will be buy now. buy on low price in the weekdays higher sold on fut champions weekend

aphrs commented 7 years ago

Well i'm interested on buy now method, I don't see it on the API but only this one to place bid : apiClient.placeBid(tradeId, coins, function(error, response){ }); How do you buy now ?

moisty70 commented 7 years ago

I bought Chelsea's GK Begovic yesterday setting coins parameter equal to the buy now price of the tradeId using a placeBid call. So it is a "buyNow" if you use the correct amount.

yhanssens commented 7 years ago

Did you manage to get any results @moisty70 ? I seem to have the same problem. The response code I get is 494. A quick google search gives me the following on that: 494 Request Header Too Large. Not sure what to do now :)

moisty70 commented 7 years ago

@joertler yes I've done a loop to buy players at my desired price and works, Post your code here to check it. If you want I can post mine. Not in the same PC now.

yhanssens commented 7 years ago

Already figured it out :) Thanks anyway! Currently working on some trade tactics. Did you find a rewarding one?