Jump to content
McKay Development

Dr. McKay

Administrator
  • Posts

    3540
  • Joined

  • Last visited

Contact Methods

  • Website URL
    https://www.doctormckay.com

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

48126 profile views
  1. Looks fine to me, you probably have a mistake elsewhere in your code.
  2. What versions are you using?
  3. client.chat.on('chatMessage', function (message) { // message is an object that includes chat_group_id and chat_id properties // ref: https://github.com/DoctorMcKay/node-steam-user/wiki/SteamChatRoomClient#incoming-chat-message });
  4. You can't send a trade with an API key. If a trade offer includes CS2 items, you can't check its status with an API key.
  5. Cookies issued using the SteamClient platform type are universal and work across all domains.
  6. TradeOfferManager isn't ready until you call setCookies on it. You can get cookies from SteamUser's webSession event.
  7. Can you give any details?
  8. Every Steam WebAPI endpoint that accepts and outputs protobuf also accepts input_json, and will output json. Here is the protobuf definition for BatchedQueryRewardItems/v1, and repeated .CLoyaltyRewards_QueryRewardItems_Request requests means that it expects a json object with key "requests", which is an array of CLoyaltyRewards_QueryRewardItems_Request objects, which is defined here. So we could make a URL like this: https://api.steampowered.com/ILoyaltyRewardsService/BatchedQueryRewardItems/v1?input_json=%7B%22requests%22%3A%5B%7B%22appids%22%3A%5B%5D%2C%22community_item_classes%22%3A%5B3%5D%2C%22reward_types%22%3A%5B1%5D%2C%22excluded_community_item_classes%22%3A%5B%5D%2C%22definitionids%22%3A%5B%5D%2C%22filters%22%3A%5B4%5D%2C%22filter_match_all_category_tags%22%3A%5B%5D%2C%22filter_match_any_category_tags%22%3A%5B%5D%2C%22contains_definitionids%22%3A%5B%5D%2C%22excluded_content_descriptors%22%3A%5B%5D%2C%22excluded_appids%22%3A%5B%5D%2C%22excluded_store_tagids%22%3A%5B%5D%2C%22store_tagids%22%3A%5B%5D%2C%22time_available%22%3Anull%2C%22language%22%3A%22english%22%2C%22count%22%3A10%2C%22cursor%22%3Anull%2C%22sort%22%3A2%2C%22sort_descending%22%3Afalse%2C%22include_direct_purchase_disabled%22%3Anull%2C%22search_term%22%3Anull%7D%2C%7B%22appids%22%3A%5B%5D%2C%22community_item_classes%22%3A%5B17%5D%2C%22reward_types%22%3A%5B1%5D%2C%22excluded_community_item_classes%22%3A%5B%5D%2C%22definitionids%22%3A%5B%5D%2C%22filters%22%3A%5B%5D%2C%22filter_match_all_category_tags%22%3A%5B%5D%2C%22filter_match_any_category_tags%22%3A%5B%5D%2C%22contains_definitionids%22%3A%5B%5D%2C%22excluded_content_descriptors%22%3A%5B%5D%2C%22excluded_appids%22%3A%5B%5D%2C%22excluded_store_tagids%22%3A%5B%5D%2C%22store_tagids%22%3A%5B%5D%2C%22time_available%22%3Anull%2C%22language%22%3A%22english%22%2C%22count%22%3A10%2C%22cursor%22%3Anull%2C%22sort%22%3A2%2C%22sort_descending%22%3Afalse%2C%22include_direct_purchase_disabled%22%3Anull%2C%22search_term%22%3Anull%7D%5D%7D With a large enough request, you might run into URL length limitations, in which case you'd want to encode your request using those protobufs. I believe you could still pass &format=json to get a json response even if you send a protobuf request. Exactly what the community item classes, reward types, etc mean, I don't know.
  9. The callback to getOffers has three argument, not two. It's (err, sent, received) Your code as written is only looking at sent offers, so it's expected you wouldn't see your received offers in there. I also see some other issues in your code. Firstly, you're creating a new 30-second interval on checkTrades every time webSession is emitted, so after two webSession events you're calling checkTrades twice every 30 seconds, thrice after 3 emits, and so on. This is in addition to TradeOfferManager's internal 30 second polling that you've enabled via pollInterval: 30000. I'd recommend that you eliminate your checkTrades function entirely and instead use the offerList event, which is designed for exactly what you're using checkTrades for now. It'll be emitted every time TradeOfferManager performs a poll, which is every 30 seconds as configured here.
  10. Check how steam-session works.
  11. I think you're probably having issues because you're setting up a new interval every time webSession is emitted, so eventually you're calling handleWebSession() many times all at once.
  12. Oh, you're not logging in? 401 sounds like a private inventory then.
  13. No, that just sets a refresh token on the LoginSession instance without doing anything else.
  14. Your Steam session expires after a while and you'll need to login again when you get 401.
×
×
  • Create New...