Presences icon indicating copy to clipboard operation
Presences copied to clipboard

feat(NationStates): add new presence

Open onegentig opened this issue 2 years ago • 0 comments

Description

Creation of a new presence for NationStates (wikipedia), a multiplayer government simulation browser game, including the game's official forums.

example_#1 example_#2 example_#3

Settings

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

Screenshots

Proof showing the creation/modification is working as expected

NationStates index page, not logged in NationStates index page, not logged in

Browsing a nation; not logged in Browsing a nation; not logged in

Creating a new nation Creating a new nation

Settings - displayname short, no button Settings - displayname short, no button

Settings - displayname short, button enabled Settings - displayname short, button enabled

Settings - displayname full, button enabled Settings - displayname full, button enabled

Viewing someone else's nation Viewing someone else's nation

Region page Region page

Resolving an issue Resolving an issue

Forums: Index page Forums: Index page

Forums: Viewing a post Forums: Viewing a post

onegentig avatar Aug 10 '22 18:08 onegentig