"Active:" value?

"Active:" value?

in API Development

Posted by: Ayusaki.6739

Ayusaki.6739

For the program we’re working on, determining which character the API key holder is currently playing would be helpful.

The team and I were hoping that when “age:” was introduced it would be in minutes, that way we could use that information to check up on their current character by checking if that number was updated since last check, thus letting us make the inference that they are currently active on that character.

Since it seems like it’s in days, it won’t really accomplish what we’re looking to determine. Would it be within the realm of possibility – not necessarily now – to add in an “active:” endpoint as well to the character output to accomplish what we’re looking to do? If the api holder is not logged in, or logged in as invisible, it could have the “active:” value set to 0 (or blank), and if they’re logged in under a character, it should set the flag for that character to 1. I believe, if anything, that having an “active:” endpoint would be a welcome addition to “age:” because of these reasons.

Thanks for all the support and interactions with the community on these discussions.

[KnT] Kuliya/Kessumi/Kiyuu/Hit My Zerg Not Me

"Active:" value?

in API Development

Posted by: smiley.1438

smiley.1438

I don’t know what kind of program you are writing, but in case it runs on the client’s desktop, you could simply use the mumble link API to get the current character. However, i guess it’s something which could probably be exposed via the API though.

You might want to comment or add a PR over here: https://github.com/arenanet/api-cdi/pulls

(edited by smiley.1438)

"Active:" value?

in API Development

Posted by: Lawton Campbell

Lawton Campbell

Web Programmer

Since it seems like it’s in days, it won’t really accomplish what we’re looking to determine.

It’s actually in seconds. Example: 2093880 seconds = 581 hours, which is what’s display in-game for “/age” for me.

Keep in mind that due to technical constraints and the implications of shared state in distributed systems, the value returned by the API may be stale up to 5 minutes. So it’s not that viable to determine which character is currently online.

Would it be within the realm of possibility – not necessarily now – to add in an “active:” endpoint as well to the character output to accomplish what we’re looking to do?

That’s something we can add (using the backend functionality that powers the party/chat system), but I’m a bit concerned about providing that with the current scopes — personally I’d rather not implicitly allow third parties to track the hours I’m online. It’d be better to put that (and some other bits that escape me) behind a separate scope, I think.

(edited by Lawton Campbell.8517)

"Active:" value?

in API Development

Posted by: Ayusaki.6739

Ayusaki.6739

That’s something we can add (using the backend functionality that powers the party/chat system), but I’m a bit concerned about providing that with the current scopes — personally I’d rather not implicitly allow third parties to track the hours I’m online. It’d be better to put that (and some other bits that escape me) behind a separate scope, I think.

Agreed, having that information behind a scope would be safest. The option to turn that off would be very helpful for people who want to use the API but not be tracked in such a manner.

That’s what I was thinking before, just in case you don’t want someone or a service being able to tell if you’re online.

Keep in mind that due to technical constraints and the implications of shared state in distributed systems, the value returned by the API may be stale up to 5 minutes. So it’s not that viable to determine which character is currently online.

That will be just fine, because we’re using this for WvW, so by the time most people are ready to roll out, the information would have repopulated and be relevant again.

Thanks for the reply! I appreciate it.

[KnT] Kuliya/Kessumi/Kiyuu/Hit My Zerg Not Me

(edited by Ayusaki.6739)