Jump to content
McKay Development

Recommended Posts

Posted

Hi all, I want to get all items from PointsShop such as avatars/frames/backgrounds. As I understand steam uses ILoyaltyRewardsService/BatchedQueryRewardItems/v1 to load the data.
But the data is protobuff encoded, maybe someone knows a scheme or another way how I can parse items from PointsShop?

Posted

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.

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...