C# Class CSharpTradeOffers.Trading.EconServiceHandler

Handles EconService related tasks such as trade offers.
显示文件 Open project: FatherFoxxy/CSharpTradeOffers Class Usage Examples

Public Methods

Method Description
AcceptTradeOffer ( uint tradeId, uint partnerId, CookieContainer container, string serverid ) : CSharpTradeOffers.Trading.Trade

Accepts a specified trade offer.

CancelTradeOffer ( ulong tradeofferid ) : string

Cancels a trade offer based on the specified tradeofferid.

DeclineTradeOffer ( ulong tradeofferid ) : string

Declines a trade offer that was sent to you.

EconServiceHandler ( string apiKey ) : System
EmailConfirmSendOffer ( uint accountId, uint tradeOfferId, ulong confirmationCode, string mId ) : void

Accepts an email-confirmation

GetTradeOffer ( ulong tradeofferid, string language = "english" ) : CSharpTradeOffers.Trading.CEconTradeOffer

Requests a single trade offer based on the tradeofferid.

GetTradeOffers ( string>.Dictionary data ) : CSharpTradeOffers.Trading.TradeOffersList

Requests all trade offers.

GetTradeOffersSummary ( uint timeLastVisit ) : CSharpTradeOffers.Trading.GetTradeOffersSummaryResponse

Requestss TradeOffer statistics. ie: historical_received_count

ModifyTradeOffer ( ulong partnerSid, string tradeoffermessage, string serverid, uint tradeofferidCountered, CSharpTradeOffers.Trading.TradeOffer offer, CookieContainer container ) : SendOfferResponse

Modifies an existing trade offer.

SendTradeOffer ( ulong partnerSid, string tradeoffermessage, string serverid, CSharpTradeOffers.Trading.TradeOffer offer, CookieContainer container ) : SendOfferResponse

Sends a trade offer to the specified recipient.

SendTradeOfferWithLink ( ulong partnerSid, string token, string tradeoffermessage, string serverid, CSharpTradeOffers.Trading.TradeOffer offer, CookieContainer container ) : SendOfferResponse

Sends a trade offer to the specified recipient that's not on your friends list using the trade url. If is not the case, use SendTradeOffer function.

Method Details

AcceptTradeOffer() public method

Accepts a specified trade offer.
public AcceptTradeOffer ( uint tradeId, uint partnerId, CookieContainer container, string serverid ) : CSharpTradeOffers.Trading.Trade
tradeId uint A ulong representing the trade to accept.
partnerId uint The AccountId of the person to trade with.
container System.Net.CookieContainer Auth Cookies MUST be passed here, the function will fail if not.
serverid string Almost always 1, not quite sure what other numbers do.
return CSharpTradeOffers.Trading.Trade

CancelTradeOffer() public method

Cancels a trade offer based on the specified tradeofferid.
public CancelTradeOffer ( ulong tradeofferid ) : string
tradeofferid ulong The ID of the offer to cancel.
return string

DeclineTradeOffer() public method

Declines a trade offer that was sent to you.
public DeclineTradeOffer ( ulong tradeofferid ) : string
tradeofferid ulong The ID of the offer to decline.
return string

EconServiceHandler() public method

public EconServiceHandler ( string apiKey ) : System
apiKey string
return System

EmailConfirmSendOffer() public method

Accepts an email-confirmation
public EmailConfirmSendOffer ( uint accountId, uint tradeOfferId, ulong confirmationCode, string mId ) : void
accountId uint Your accountId
tradeOfferId uint Trade offer id of the offer to confirm
confirmationCode ulong Confirmation code
mId string No idea, but it looks something like: wiGVgcpbphpfTU5vDzD9uIwqtGlG8_QaWJqNmq5dOW3P3
return void

GetTradeOffer() public method

Requests a single trade offer based on the tradeofferid.
public GetTradeOffer ( ulong tradeofferid, string language = "english" ) : CSharpTradeOffers.Trading.CEconTradeOffer
tradeofferid ulong The tradeofferid to request information on.
language string The language to use. Default: english
return CSharpTradeOffers.Trading.CEconTradeOffer

GetTradeOffers() public method

Requests all trade offers.
public GetTradeOffers ( string>.Dictionary data ) : CSharpTradeOffers.Trading.TradeOffersList
data string>.Dictionary A dictionary containing the URL params found here: https://developer.valvesoftware.com/wiki/Steam_Web_API/IEconService at GetTradeOffers (v1). /// ex: [leftarrow]"get_sent_offers","1"[rightarrow]. Please note, [leftarrow] and [rightarrow] correspond to the keys on the keyboard.
return CSharpTradeOffers.Trading.TradeOffersList

GetTradeOffersSummary() public method

Requestss TradeOffer statistics. ie: historical_received_count
public GetTradeOffersSummary ( uint timeLastVisit ) : CSharpTradeOffers.Trading.GetTradeOffersSummaryResponse
timeLastVisit uint Unix time for historical cutoff.
return CSharpTradeOffers.Trading.GetTradeOffersSummaryResponse

ModifyTradeOffer() public method

Modifies an existing trade offer.
public ModifyTradeOffer ( ulong partnerSid, string tradeoffermessage, string serverid, uint tradeofferidCountered, CSharpTradeOffers.Trading.TradeOffer offer, CookieContainer container ) : SendOfferResponse
partnerSid ulong The SteamId64 (ulong) of the person whose offer will be modified.
tradeoffermessage string An otpional message to be sent with the trade offer. Can be null.
serverid string Almost always 1, not quite sure what other numbers do.
tradeofferidCountered uint The TradeId of the offer to counter or modify.
offer CSharpTradeOffers.Trading.TradeOffer A TradeOffer object containing the trade parameters.
container System.Net.CookieContainer Auth Cookies MUST be passed here, the function will fail if not.
return SendOfferResponse

SendTradeOffer() public method

Sends a trade offer to the specified recipient.
public SendTradeOffer ( ulong partnerSid, string tradeoffermessage, string serverid, CSharpTradeOffers.Trading.TradeOffer offer, CookieContainer container ) : SendOfferResponse
partnerSid ulong The SteamId64 (ulong) of the person to send the offer to.
tradeoffermessage string An optional message to be sent with the offer. Can be null.
serverid string Almost always 1, not quite sure what other numbers do.
offer CSharpTradeOffers.Trading.TradeOffer A TradeOffer object containing the trade parameters.
container System.Net.CookieContainer Auth Cookies MUST be passed here, the function will fail if not.
return SendOfferResponse

SendTradeOfferWithLink() public method

Sends a trade offer to the specified recipient that's not on your friends list using the trade url. If is not the case, use SendTradeOffer function.
public SendTradeOfferWithLink ( ulong partnerSid, string token, string tradeoffermessage, string serverid, CSharpTradeOffers.Trading.TradeOffer offer, CookieContainer container ) : SendOfferResponse
partnerSid ulong The SteamId64 (ulong) of the person to send the offer to.
token string The token part from the recipient's trade url. Example: a1b2cdEF
tradeoffermessage string An optional message to be sent with the offer. Can be null.
serverid string Almost always 1, not quite sure what other numbers do.
offer CSharpTradeOffers.Trading.TradeOffer A TradeOffer object containing the trade parameters.
container System.Net.CookieContainer Auth Cookies MUST be passed here, the function will fail if not.
return SendOfferResponse