Jump to content
McKay Development

Steam Web API/IEconService [input, output]


Recommended Posts

Posted
Hello Community ! Please help non-native English speaking person to understand trade offers API !
I use node-steam-tradeoffers, (sorry Dr. McKay) and thank you for another brillliant lib -  node-steam-user !
 
Input
 
Either get_sent_offers or get_received_offers (or both) must be set. active_only and historical_only are optional, if neither is passed it is equivalent to both being set.
 
get_sent_offers - return the list of offers you've sent to other people.
 
get_received_offers - return the list of offers you've received from other people.
 
get_descriptions - return item display information for any items included in the returned offers.
 
language - needed if get_descriptions is set, the language to use for item descriptions.
 
active_only - return only trade offers in an active state (offers that haven't been accepted yet), or any offers that have had their state change since time_historical_cutoff.
 
historical_only - return trade offers that are not in an active state.
 
time_historical_cutoff - a unix time value. when active_only is set, inactive offers will be returned if their state was updated since this time. Useful to get delta updates on what has changed. WARNING: If not passed, this will default to the time your account last viewed the trade offers page. To avoid this behavior use a very low or very high date.
 
 
So ! I'am listening for a new offer, and when it fired i must handle offers.
when i use
offer.getOffers({
    get_sent_offers: 1,
    active_only: 1
}, callback) 

Output

in a callback(err, body), where body.response.trade_offers_received is Array.

 
as i understand historical_only is optional and if didn't passed it, in my result will be all offers ( for all period or some period ? );
 
1 question - If my task is get offers which were sent and their status is active, should i do like this ?
{
    get_sent_offers: 1,
    active_only: 1,
    historical: 0
}

2 question - if i sent an offer and it has been refused, how i know for sure that person refused  and if accepteed how i can know for sure that item i gave is exactly what he received ? ( OMG in this sentence tone of mistakes i think, shame on me);

 

3 question - if i need get all offer from this hour/day/week time_historical_cutoff i need ?
 
Thank you for any help and sorry for my bad bad bad English.
Posted

1. If you want to get all active offers and that's it, you'd use this:

{
    "get_sent_offers": 1,
    "active_only": 1,
    "time_historical_cutoff": 2147483647
}

2. You'd check the trade_offer_state. If they accepted it then they received the item you sent them.

3. If you want all offers from a time period you'll need to just leave out both active_only and historical_only and filter the result.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...