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

Achievement details & unlock rate #32

Closed
zeroquinc opened this issue May 16, 2024 · 7 comments
Closed

Achievement details & unlock rate #32

zeroquinc opened this issue May 16, 2024 · 7 comments

Comments

@zeroquinc
Copy link

zeroquinc commented May 16, 2024

Hi,

I have this for example:

steam.apps.get_app_details("504230", filters="achievements")

And it returns this:

{
   "504230":{
      "success":true,
      "data":{
         "achievements":{
            "total":32,
            "highlighted":[
               {
                  "name":"Celeste",
                  "path":"https://cdn.akamai.steamstatic.com/steamcommunity/public/images/apps/504230/f8563120e18b88ff7e31b03ff6fcb61c5553b1ac.jpg"
               },
               {
                  "name":"Forsaken",
                  "path":"https://cdn.akamai.steamstatic.com/steamcommunity/public/images/apps/504230/6d16bf0629b862295a62b2d92ab22a94dc593903.jpg"
               },
               {
                  "name":"Archaeology",
                  "path":"https://cdn.akamai.steamstatic.com/steamcommunity/public/images/apps/504230/7544829d732b63de52eb0e68c796a68e8153c26f.jpg"
               },
               {
                  "name":"Checking Out",
                  "path":"https://cdn.akamai.steamstatic.com/steamcommunity/public/images/apps/504230/7e202a373754eac26194d75d6ba82e7fcc48ea42.jpg"
               },
               {
                  "name":"Breathe",
                  "path":"https://cdn.akamai.steamstatic.com/steamcommunity/public/images/apps/504230/fc3f2ae7d42ce92886c166aff6e9868b6dd9c518.jpg"
               },
               {
                  "name":"In the Mirror",
                  "path":"https://cdn.akamai.steamstatic.com/steamcommunity/public/images/apps/504230/902474b484af5d94aeaa22d74e3559c47e94beec.jpg"
               },
               {
                  "name":"Reflection",
                  "path":"https://cdn.akamai.steamstatic.com/steamcommunity/public/images/apps/504230/82f006e8c91ec81c8af98f7e5c59ad2ea1f8b0b1.jpg"
               },
               {
                  "name":"Strawberry Badge",
                  "path":"https://cdn.akamai.steamstatic.com/steamcommunity/public/images/apps/504230/64cffde21bf6fba1d3749e751a5772765f95357c.jpg"
               },
               {
                  "name":"Strawberry Medal",
                  "path":"https://cdn.akamai.steamstatic.com/steamcommunity/public/images/apps/504230/0e3b7b3e990ea0e212df36054e31521d29da21ca.jpg"
               },
               {
                  "name":"Impress Your Friends",
                  "path":"https://cdn.akamai.steamstatic.com/steamcommunity/public/images/apps/504230/9b043fec21f1028d306f0908b401c86d8869c334.jpg"
               }
            ]
         }
      }
   }
}

Is it possible to add these things:

  • Achievement Details
  • Global Unlock Rate
  • apiName?

With apiName I mean the following, it returns this when I check for example:

user_achievements = steam.apps.get_user_achievements("redacted", "504230")

Returns:

{
   "playerstats":{
      "steamID":"redacted",
      "gameName":"Celeste",
      "achievements":[
         {
            "apiname":"CH7",
            "achieved":1,
            "unlocktime":1710068747
         },
         {
            "apiname":"CH1",
            "achieved":1,
            "unlocktime":1709924417
         },
         {
            "apiname":"CH2",
            "achieved":1,
            "unlocktime":1709925745
         },
         {
            "apiname":"CH3",
            "achieved":1,
            "unlocktime":1709935466
         },
         {
            "apiname":"CH4",
            "achieved":1,
            "unlocktime":1709984637
         },
         {
            "apiname":"CH5",
            "achieved":1,
            "unlocktime":1710006604
         },

But because the apiname isnt in the get_app_details I can't check these values to see which name / details belong to which unlocked achievement.

Also how come it only shows 9 achievements and not all the 32?

Thank you very much in advance.

@deivit24
Copy link
Owner

Will take a look at this over the weekend! Vacation at the moment

@zeroquinc
Copy link
Author

Will take a look at this over the weekend! Vacation at the moment

Cheers, maybe I'll try to do a pull request before the weekend.

Enjoy your holiday!

@zeroquinc
Copy link
Author

zeroquinc commented May 16, 2024

This is what I had in mind:

{
   "playerstats":{
      "steamID":"redacted",
      "gameName":"Celeste",
      "achievements":[
         {
            "apiname":"CH6",
            "name":"Reflection",
            "details":"Complete Chapter 6"
            "unlocked_by":"6.434321%"
            "image": "https://cdn.akamai.steamstatic.com/steamcommunity/public/images/apps/504230/82f006e8c91ec81c8af98f7e5c59ad2ea1f8b0b1.jpg"
            "achieved":1,
            "unlocktime":1710068747
         },

@zeroquinc
Copy link
Author

zeroquinc commented May 24, 2024

#18 (comment)

Seems like I want exactly this, the only pull request that didn't got merged :(

More info I found: https://stackoverflow.com/questions/24315841/optional-values-from-steam-web-api

@deivit24
Copy link
Owner

@zeroquinc Hey wow ya I got a PR and asked for updates. Will make updates to this and get a release out tomorrow!

@zeroquinc
Copy link
Author

@zeroquinc Hey wow ya I got a PR and asked for updates. Will make updates to this and get a release out tomorrow!

Thanks, in the meanwhile I created my own API translation for my project to see if it worked, and if you pass the "l" parameter you get the achievement details, only not the ones that are hidden, so that kinda sucks.

https://github.com/zeroquinc/Steamcord/blob/main/api/game.py

I kinda fixed that by scraping "completionists.me" website once and save the descriptions to a json.

https://github.com/zeroquinc/Steamcord/blob/main/src/steam/functions.py

@deivit24
Copy link
Owner

@zeroquinc issue will be closed! In the new release

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

2 participants