NATION

PASSWORD

NationStates API (nationdata/regiondata)

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.

Advertisement

Remove ads

User avatar
SherpDaWerp
Envoy
 
Posts: 326
Founded: Mar 02, 2016
Anarchy

Postby SherpDaWerp » Thu Feb 13, 2020 4:28 pm

9003 wrote:
SherpDaWerp wrote:Bit of an odd question, this one:

What order, if any, does the server return nations when you query:
https://www.nationstates.net/cgi-bin/ap ... &q=nations

It's quite obviously not alphabetical and doesn't seem to be based on any of the census scores, but it doesn't change, so it's not random either. I assume it's something to do with the order the server processes them in? Clarification pls

It appears to be based on residency with the most stationary at the start and as nations move in they are simply appended to the end.

Doesn't seem that way to me...

https://www.nationstates.net/cgi-bin/ap ... &q=nations
  1. voice_of_mod
  2. a_badly_conceived_designation
  3. testlandia
  4. lemon_42
  5. mesoafricana
Residency Census
  1. Voice of Mod
  2. A Badly Conceived Designation
  3. The Blaatschapens nation
  4. Meta Luna
  5. Greenerica
The first 5 of each aren't in the same order.
OOC: High school student who should almost definitely be doing assignments instead
  • I once wrote a 924-word analysis of how memes-as-political-commentary have a detrimental impact on many social issues. I got a 90% grade on my first draft.
  • My hobbies/interests include programming, parkour, hiking, camping, gaming, tabletop RPGs, and playing NationStates, of course
  • I seem to spend quite a bit of time explaining the effects of issue options. Good reading comprehension and a basic understanding of NS stats can work wonders, even without a backstage pass...

User avatar
The Northern Light
Attaché
 
Posts: 96
Founded: Oct 10, 2014
Inoffensive Centrist Democracy

Postby The Northern Light » Thu Feb 13, 2020 11:34 pm

Bug report

The nation dump seems to be containing some mixed up information about endorsements. Here is one example (out of many) from the nation dump produced 30 minutes ago:

Code: Select all
<NATION id="the_kingdom_of_the_greeks">
<NAME>the_kingdom_of_the_greeks</NAME>
<UNSTATUS>WA Member</UNSTATUS>
<ENDORSEMENTS>amerion,qvait,madreia,malonereich,tepertopia,erinor,aidenfieeld,land_without_shrimp,barabarom,bleakfoot,crystal_creation,marinho_islands,volaworand,aumeltopia,isles_of_creckero,tarnik,bawkie,greater_scott_islands,bizzie,mapico,united_federated_states_of_omega,wehraboos,yaorozu,a_world_assembly_member,orado,imperial_joseon,empy,alunya,guer_aike,crader,el_fiji_grande,</ENDORSEMENTS>
<REGION>the_north_pacific</REGION>
<LASTLOGIN>1581630871</LASTLOGIN>
<INFLUENCE>Unproven</INFLUENCE>
<CENSUS>
<SCALE id="66">
<SCORE>31</SCORE>
</SCALE>
</CENSUS>
</NATION>


Note that the nation is in The North Pacific, and has been there since 2/13/2020, 4:22:12 PM EST. Before that, the nation was in The South Pacific.

The list of endorsements contains several nations that are in The South Pacific, and were presumably this nation's endorsements while in The South Pacific:
amerion,qvait,madreia,malonereich,tepertopia,erinor,aidenfieeld,land_without_shrimp,barabarom,bleakfoot,crystal_creation,marinho_islands,volaworand,aumeltopia,isles_of_creckero,tarnik,bawkie,greater_scott_islands,bizzie,mapico,united_federated_states_of_omega,wehraboos


This bug seems to affect several nations, and has been happening since at least the start of the year (I suspect it was happening before that as well, but I didn't check all the way back).
Home of the WADP, Planet Eras, and the Constibillocode!
Join The North Pacific!
Where the democracy is strong, the debate robust, and the rum plentiful!

Forum | Discord Chat | Citizenship | Executive Staff | North Pacific Army | World Assembly Ministry | Roleplay | Trading Cards | Handbook

User avatar
SherpDaWerp
Envoy
 
Posts: 326
Founded: Mar 02, 2016
Anarchy

Postby SherpDaWerp » Sun Feb 16, 2020 4:44 am

Request for a new shard:

Would it be possible to have a shard for a region's activity? Essentially, this:
https://www.nationstates.net/page=activ ... ss_gallows
But as an API shard. Ideally, in the format of the messages shard, where you can specify "since timestamp" or "last x" items.
OOC: High school student who should almost definitely be doing assignments instead
  • I once wrote a 924-word analysis of how memes-as-political-commentary have a detrimental impact on many social issues. I got a 90% grade on my first draft.
  • My hobbies/interests include programming, parkour, hiking, camping, gaming, tabletop RPGs, and playing NationStates, of course
  • I seem to spend quite a bit of time explaining the effects of issue options. Good reading comprehension and a basic understanding of NS stats can work wonders, even without a backstage pass...

User avatar
Trotterdam
Powerbroker
 
Posts: 8204
Founded: Jan 12, 2012
Left-Leaning College State

Postby Trotterdam » Sun Feb 16, 2020 8:24 am

SherpDaWerp wrote:Request for a new shard:

Would it be possible to have a shard for a region's activity? Essentially, this:
https://www.nationstates.net/page=activ ... ss_gallows
But as an API shard. Ideally, in the format of the messages shard, where you can specify "since timestamp" or "last x" items.
Uh, I'm pretty sure this already exists. https://www.nationstates.net/cgi-bin/api.cgi?q=happenings&view=region.glass_gallows what you want?

Do note the slightly illogcal behavior that while national happenings are included in this regional feed (both links), it includes or excludes nations based on which region they're in at the time you request the shard, not at the time the happening occurred. You can probably make this issue go away by filtering for only happening categories that are genuinely regional in nature, if those are what you're interested in.

User avatar
SherpDaWerp
Envoy
 
Posts: 326
Founded: Mar 02, 2016
Anarchy

Postby SherpDaWerp » Sun Feb 16, 2020 5:04 pm

Trotterdam wrote:
SherpDaWerp wrote:Request for a new shard:

Would it be possible to have a shard for a region's activity? Essentially, this:
https://www.nationstates.net/page=activ ... ss_gallows
But as an API shard. Ideally, in the format of the messages shard, where you can specify "since timestamp" or "last x" items.
Uh, I'm pretty sure this already exists. https://www.nationstates.net/cgi-bin/api.cgi?q=happenings&view=region.glass_gallows what you want?

Do note the slightly illogcal behavior that while national happenings are included in this regional feed (both links), it includes or excludes nations based on which region they're in at the time you request the shard, not at the time the happening occurred. You can probably make this issue go away by filtering for only happening categories that are genuinely regional in nature, if those are what you're interested in.

Oh. I should have looked in the world shards... I was looking at this:
https://www.nationstates.net/cgi-bin/ap ... happenings
where you're requesting happenings like it's a region shard, and I wanted more information but couldn't find how.

Thanks!
OOC: High school student who should almost definitely be doing assignments instead
  • I once wrote a 924-word analysis of how memes-as-political-commentary have a detrimental impact on many social issues. I got a 90% grade on my first draft.
  • My hobbies/interests include programming, parkour, hiking, camping, gaming, tabletop RPGs, and playing NationStates, of course
  • I seem to spend quite a bit of time explaining the effects of issue options. Good reading comprehension and a basic understanding of NS stats can work wonders, even without a backstage pass...

Previous

Return to Technical

Who is online

Users browsing this forum: Anxiety Cafe

Advertisement

Remove ads