Presences
Presences copied to clipboard
feat(NationStates): add new presence
Description
Creation of a new presence for NationStates (wikipedia), a multiplayer government simulation browser game, including the game's official forums.
Settings

-
Show Button Name changes how is the user's nation name displayed.
- Full — ex. "America, United States of"
- Short — ex. "America"
- None
- Show Button enables a "View Nation" button leading to nation's webpage.
API Notice
The updatePresenceData()
method in presence.ts
fetches data from NationStates API on three occasions:
- Logged in (fetches nation name and type)
- Visiting other nations (fetches nation name)
- Visiting a region (fetches region name)
API has a rate-limit for max. 50 requests per 30 seconds, which cannot be reached, as updatePresenceData()
runs every 10 seconds and will maximally fetch data twice.
Acknowledgements
- [X] I read the Presence Guidelines
- [X] I linted the code by running
yarn format
- [x] The PR title follows the repo's commit conventions
Screenshots
Proof showing the creation/modification is working as expected
NationStates index page, not logged in
Browsing a nation; not logged in
Creating a new nation
Settings - displayname short, no button
Settings - displayname short, button enabled
Settings - displayname full, button enabled
Viewing someone else's nation
Region page
Resolving an issue
Forums: Index page
Forums: Viewing a post