Figuring out the Puzzle id from the screenshot url and query for achievements

I have 2 questions/suggestions about data I need for some ideas I had:

  • Is there a way to infer the puzzle id from the screenshot url? I had an idea for a statbot that checks which progression puzzles people ask the most help for, and where do most people quit. However for where people ask for help I need to be able to read the screenshot url. Also, if the url doesn’t have anything to do with the id, could it be changed? I mean I if it would be /puzzleid-screenshotindex it wouldn’t creat any collisions with the current system.
  • Is there a query to check for badges/achievements/etc?
1 Like

As far as I know, there is no metadata associated with screenshots currently. I hope to change that once Vieet and I get to reimplement screenshots for the HTML chat. As far as how the URLs are generated currently, I’m not sure. They look random, but I’d probably need a dev to confirm that.There are a few queries that might do what you’re looking for re: badges/achievements. Check into achievement_roadmap (note, this is from an old webpage that’s no longer used, so essentially deprecated), side_project_roadmap (used to populate the home screen for a logged in user), and the me/user queries (used to populate the profile page)

I found the achievements data in “me” however: 1. It seems to cut off before the actual end of the json, and 2. It only works for the logged user. “user” gives much less information. It doesn’t feel right, as I can see other people’s achievemens while being logged into my user

I’m not sure what you mean about it cutting off. If you’re looking at it from your browser, you could get a screwy view, since it has embedded html, with the forward slashes escaped. You’d really want to look at the response in the network tools, do a query from JS, or use an HTTP query tool (I’ve fussed with postman a bit, and it’s pretty nice). This query is of course built for the logged in user.

I just took another look into these queries, and realized this gets a little weird. ‘me’ is actually not used to generate the profile page, however does contain similar data to ‘my_user’, which is what’s actually used, and more closely mirrors the ‘user’ query. For both ‘my_user’ and ‘user’, there is an additional parameter called ‘tab_type’, which provides different data depending on which page of the profile you are on:

Since the badges show up on the first tab of the profile page, you should add ‘&tab_type=about’ to the URL of the query you’re making.