Topic

[API] skills.listLearning change?

So my app started dying today when I switched to Transcendental Radiation. The problem is that it's not getting as much detail in the output as it used to:

"post_reqs": {
"0": {
"type": "skill",
"ok": 0,
"skill": "transcendental_radiation_1"
},
"1": {
"type": "skill",
"ok": 0,
"skill": "meditativearts_3"
}
},

These entries used to have "name" and "state" and "queue" and other useful stuff in them. Where did it go?

Posted 19 months ago by Taral Subscriber! | Permalink

Replies

  • Did you check to see if it matches the API Explorer?
    api.glitch.com/explore/#!sk...
    I'm not learning anything, or have anything available, so, I can't test.
    Posted 19 months ago by NathanG Subscriber! | Permalink
  • Looks like the information is all there but just slightly differently arranged?
    Posted 19 months ago by geoffreak Subscriber! | Permalink
  • Yeah, I pulled that from API Explorer.

    No, the "state" key is missing from the skills in the post_reqs section. This used to happen before, but not in the first tier. It's breaking my code because it needs to find the "state" key for the current skill (Transcendental Radiation, in this case).
    Posted 19 months ago by Taral Subscriber! | Permalink
  • Hi Taral. I'm having trouble isolating what might have caused this change, so I'm hoping you can help me narrow it down.

    Did it just suddenly start 4 days ago, or is it possible it started earlier? (If so, how much earlier?)

    The problem you're reporting is that the 'post_reqs' element used to have more properties under it, like name, state, and queue for each skill? Or that those properties used to be somewhere else in the response and no longer are?

    Which auth scope are you using?
    Posted 19 months ago by Myles! Subscriber! | Permalink
  • Wait -- you can change your skills when Glitch is not open?  What is that above, it looks like a foreign language to me!!
    Posted 19 months ago by Laurali Subscriber! | Permalink
  • @Laurali

    Using the API, developers who are not Tiny Speck staff can write small programs (scripts) that help you do things in the game.

    One of those scripts allows you to queue up the skills that you want to learn, so that, while the game is running and you have a browser window open on Glitch, you automatically start learning a new skill when you finish learning your current one.

    Other scripts display Glitch pages in a different way than the game does. 

    For more information see this thread
    beta.glitch.com/forum/gener...
    Posted 19 months ago by WindBorn Subscriber! | Permalink
  • I'll have to ask my boyfriend to help me with that, cause thats awesome!
    Posted 19 months ago by Laurali Subscriber! | Permalink
  • @Myles! - It's possible that this existed before; it manifested right after a skill switch. So it's possible that it's limited to only certain skills (like TR), and this was just the first I hit.

    The problem I'm reporting is that the elements of post_reqs used to have a "state" key in them (along with other keys). Specifically, my code does the equivalent of this: (I'm translating to JavaScript for convenience.)

    function getSkillDetail(skill) {
        var unlocks = skill.required_skills[0].state.post_reqs
        for (i in unlocks) {
            if (i.type == "skill" && i.skill.name == skill.name) {
                return i.skill
            }
        }
        return null
    }

    For TR, this code fails to locate a suitable object and returns null. :(

    I'm using write scope.
    Posted 19 months ago by Taral Subscriber! | Permalink
  • FYI: Bees! was looking at changing the listLearning output to be less spammy. That might be related.
    Posted 19 months ago by Taral Subscriber! | Permalink