Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make pricing data more up to date #39

Open
falkben opened this issue Mar 23, 2022 · 0 comments
Open

make pricing data more up to date #39

falkben opened this issue Mar 23, 2022 · 0 comments

Comments

@falkben
Copy link
Owner

falkben commented Mar 23, 2022

Currently, the pricing data are updated along with all the regular metadata about every week, per steamapp. This is because it takes that long to iterate over all the steamapps.

If we set a filter on the response data, you can request data on multiple apps at a time.

If we filtered just for pricing data, we could then request maybe even hundreds of apps at a time and be able to keep the database much more up to date (with pricing changes).

If we want historical pricing data per app, we could consider creating a new table, however we will want to be careful since pricing changes on apps may make the database much larger. We'd certainly only want to make inserts to the database on changes (not for every time we run the pricing update)

Ideally, we'd want to run the pricing update separately (on a separate cadence) from the metadata update we currently run.

There are likely some database schema updates that will be necessary in order to support that (e.g. price_updated_on, metadata_updated_on). See #40

Example request.: https://store.steampowered.com/api/appdetails/?appids=620,1172620&l=english&filters=price_overview

Returns:

{
  "620": {
    "success": true,
    "data": {
      "price_overview": {
        "currency": "USD",
        "initial": 999,
        "final": 999,
        "discount_percent": 0,
        "initial_formatted": "",
        "final_formatted": "$9.99"
      }
    }
  },
  "1172620": {
    "success": true,
    "data": {
      "price_overview": {
        "currency": "USD",
        "initial": 3999,
        "final": 3999,
        "discount_percent": 0,
        "initial_formatted": "",
        "final_formatted": "$39.99"
      }
    }
  }
}

More info here: https://wiki.teamfortress.com/wiki/User:RJackson/StorefrontAPI#appdetails

@falkben falkben changed the title more up to date pricing make pricing data more up to date Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant