简体   繁体   English

Steam Web API 获取所有类型的应用程序?

[英]Steam Web API get all genres of app?

I'm trying to make a fun little program that incorporates showing information about steam games, but I'm not sure how to get all the genres of a specific game.我正在尝试制作一个有趣的小程序,其中包含显示有关 Steam 游戏的信息,但我不确定如何获取特定游戏的所有类型。

For this example I'll be using Borderlands 2.在这个例子中,我将使用 Borderlands 2。

This first image is from the steam store ( https://store.steampowered.com/app/49520/Borderlands_2/ )第一张图片来自蒸汽商店 ( https://store.steampowered.com/app/49520/Borderlands_2/ )

蒸汽商店的标签

This second image is from the web api ( https://store.steampowered.com/api/appdetails?appids=49520 )第二张图片来自 web api ( https://store.steampowered.com/api/appdetails?appids=49520 )

steam web api 标签

Why is it that it only has 2 genres on the webapi but way more on the steam store?为什么它在 webapi 上只有 2 种类型,而在 Steam 商店中却有更多类型? Is there another place I can use to get the rest of the genres?有没有其他地方可以用来获取其余的类型?

I'm not aware of any documented (be it officially or unofficially) API function that will allow you to read all genres of an App.我不知道有任何记录在案的(无论是正式的还是非正式的)API 函数可以让您阅读所有类型的应用程序。

Since you were asking for another place to get rest of the genres, did you consider scraping the data straight from the Steam Store page?既然您要求另一个地方来获取其余的流派,您是否考虑过直接从 Steam 商店页面抓取数据? Assuming you use NodeJS, getting the data with something like cheerio should be easy enough.假设您使用 NodeJS,使用cheerio 之类的工具获取数据应该很容易。

But: be aware that the page you are scraping from might change at any point in time without any notice.但是:请注意,您正在抓取的页面可能会随时更改,恕不另行通知。 Of course, the same applies to the API you were considering to use, which is under development, not officially documented, and meant to be used internally by Steam.当然,这同样适用于您考虑使用的 API,该 API 正在开发中,没有正式记录,旨在供 Steam 内部使用。

The screenshot you posted is of community defined store tags and not genre data.您发布的屏幕截图是社区定义的商店标签,而不是流派数据。 I have not been able to find the store tag data as part of a publicly available API.我无法在公开可用的 API 中找到商店标签数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM