Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List Item function #44

Open
suckedjs opened this issue Apr 22, 2017 · 7 comments
Open

List Item function #44

suckedjs opened this issue Apr 22, 2017 · 7 comments

Comments

@suckedjs
Copy link

I am trying to list a player from my tradepile but with no success and I see there is no item listing function included. I suppose that's has something to do with sendRequestion().

This is the request the item listing function needs to make

POST /ut/game/fifa17/auctionhouse HTTP/1.1
Host: utas.external.s3.fut.ea.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Firefox/51.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Cookie: cookie
DNT: 1
Connection: keep-alive
Referer: https://www.easports.com/iframe/fut17/bundles/futweb/web/flash/FifaUltimateTeam.swf?cl=165353
Content-type: application/json
Accept: application/json
X-UT-PHISHING-TOKEN: token
X-UT-SID: id
X-UT-Embed-Error: true
X-HTTP-Method-Override: POST
Content-length: 84
{"startingBid":300,"duration":3600,"itemData":{"id":4444444444},"buyNowPrice":350}

@JKetelaar
Copy link
Owner

Isn't this related to issue #41?

@suckedjs
Copy link
Author

suckedjs commented Apr 23, 2017 via email

@suckedjs
Copy link
Author

anyone?

@JKetelaar
Copy link
Owner

JKetelaar commented May 16, 2017

I'm really sorry for the delayed response. Unfortunately I cannot find time to achieve a result yet, hopefully I'll get it either this weekend or next weekend, it's on my top of my to-do list. ✅

@suckedjs
Copy link
Author

Great! Thanks for the response. Really looking forward to it!

@suckedjs
Copy link
Author

suckedjs commented May 20, 2017

public function ListItem($tradeId, $startingBid, $buyNowPrice, $duration) {
	if ($duration < 0) {
		return -1;
	}    
 
  return $this->sendRequest(URL::API_LIST_ITEM, Method::POST(),['startingBid' => $startingBid, 'duration' => $duration, 'itemData' =>[ 'id' => $tradeId] , 'buyNowPrice' => $buyNowPrice]);  
}

There it is! It returns item Id if successful or code 500 if the arguments are wrong.

You can use it like this:

ListItem($tradeId, "350", "400", 3600));

/* 1 hour = 3600 */

@JKetelaar
Copy link
Owner

Beast, great function. I'll start adding this into the API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants