Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/powerbi/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 我怎样才能接受steam的报价?_C#_Steam_Steam Web Api_Trading - Fatal编程技术网

C# 我怎样才能接受steam的报价?

C# 我怎样才能接受steam的报价?,c#,steam,steam-web-api,trading,C#,Steam,Steam Web Api,Trading,我已经检查了SteamBot的源代码,但我似乎不太了解它,因为我是一个新的程序员。如果有人能帮助我,那就太好了!提前谢谢 我在蒸汽机器人上找到了一条路() 但我似乎不明白 这里有一些东西可以帮助()在代码中引用类 //at the top of the file using SteamTrade.TradeOffer; //the later on in the file Offersession newSteamSession = new OfferSession('yourApiKey',

我已经检查了SteamBot的源代码,但我似乎不太了解它,因为我是一个新的程序员。如果有人能帮助我,那就太好了!提前谢谢

我在蒸汽机器人上找到了一条路()

但我似乎不明白


这里有一些东西可以帮助()

在代码中引用类

//at the top of the file
using SteamTrade.TradeOffer;

//the later on in the file
Offersession newSteamSession = new OfferSession('yourApiKey', 'steamweb');

string convertedStringtradeId = String.Empty;
var isAccepted = newSteamSession.Accept(tradeOfferId, convertedStringtradeId);

if(isAccepted) 
{
    //do more logic here if the offer was good
    //you can use the convertedStringtradeId if you need something


}else
{
  //what happens when things go wrong
}

您到底需要什么帮助?@Daemedeor使用SteamKit2或以任何其他可能的方式接受steam报价。在C#这个包中:?@Daemedeor是的。但我认为一个人不能那样做。所以我需要一种方法来接受他们。。github上的SteamBot有一个方法,但我不明白。你能更新你的描述以包含此信息,特别是哪段代码,这样任何人来到这里都不必扫描commentsHow它知道使用哪一个api密钥吗?@TheNewGuy查看更新…Offersession newSteamSession=new Offersession('yourApiKey','steamweb');参数1&2=错误(不支持为字符串?)我将尝试以下方法:webApi=newtradeofferwebapi(apiKey,steamweb);22 session=newoffersession(webApi,steamweb);如果您直接复制我的代码,当然不是……您必须实际提供由steam提供的apikey和steamWeb对象……我不太确定它来自何处