Posted: Sun Jun 13, 2021 9:59 am
Is this the place to ask why a certain player could have gotten banned?
Because sometimes even national leaders just want to hang out
https://forum.nationstates.net/
Dowaesk wrote:Is this the place to ask why a certain player could have gotten banned?
I think sensibilities are already nonrandom, unlike the other two. Also, it can contain multiple values - if you only get one then that's because your nation only qualifies for one (this is the case for Testlandia, which the example link in the API manual uses).SherpDaWerp wrote:Could the full list of notables, admirables, and sensibilities that a nation is eligible for be made available through the API? Currently, you can only request admirable, notable, and sensibilities, which gives you one, three, and one (respectively) of the eligible values for the nation. If you want to get the full list currently, you just have to keep requesting until you're pretty sure you've got them all, which is not a great approach.
Switching the shard name from "sensibilities" to "sensibility" would let you just add pluralised versions as shards, presenting the full list. Kinda similar to how the "banner" shard shows one randomly selected banner code from that nation, and "banners" shows all eligible banner codes from that nation.
EDIT: Also, internal consistency with the three existing shards would be good, i.e. displaying "notable" as a single value, rather than a set of three sentence-formatted values, in line with the admirable and sensibilities shards, which just return the single value on their own.
The <q=type> of <q=name> is a <I don't think there's an API shard for this one, it's a one-word description of your size>, <q=admirable> nation, renowned for its <q=notable>. The <q=sensibilities> population of <I don't think there's an API shard for this one, q=population doesn't do the "million"/"billion" processing> <q=demonym2plural> <I don't think there's an API shard for this one, but it's computable from q=category and a lookup table>.
Oh, right, my apologies. It's probably the case that I requested notable when I thought I was requesting sensibilities, tbh, I found myself getting mixed up between the three a decent amount while writing those posts. I was requesting of SherpDaWerp for most of them. Then again, I might have just clicked the link from the docs page, which always displays from Testlandia.Trotterdam wrote:Also, it can contain multiple values - if you only get one then that's because your nation only qualifies for one (this is the case for Testlandia, which the example link in the API manual uses).
Yeah, but (I was of the opinion that) none of the other ones display with sentence-formatting despite all of them having that on the page.Trotterdam wrote:The q=notable shard displays the comma-separated-list-of-three because that's how it's actually shown on your nation page.
I swear I'd seen those pop up in an admirable request, but double-checking confirms I'm wrong. It's not really my day today, huh.Trotterdam wrote:<I don't think there's an API shard for this one, it's a one-word description of your size>
I don't think there's any interest in a "one randomly-selected value" shard. Generally, you'll want either the as-formatted-on-the-nation-page texts (what we have now, which is random for notables and admirables but not for sensibilities), or the full nonrandom list (currently available only for sensibilities, although comma-separated rather than XML-separated - not so much of an issue for sensibilities, where individual entries never include commas, but a notables list should definitely be XML-separated since some individual ones do include commas), to which you can then apply any post-processing you like (such as picking one) yourself.SherpDaWerp wrote:it would make sense for the three "singular" shards to return just one value with no formatting.
SherpDaWerp wrote:Could the full list of notables and admirables that a nation is eligible for be made available through the API? Currently, you can only request admirable, notable which gives you one or three (respectively) of the eligible values for the nation. If you want to get the full list currently, you just have to keep requesting until you're pretty sure you've got them all, which is not a great approach.
What I have in mind is kinda similar to how the "banner" shard shows one randomly selected banner code from that nation, and "banners" shows all eligible banner codes from that nation.
[violet] wrote:Added as shard "notables".
Trotterdam wrote:The current randomized shards are already of pretty dubious use, the only reason they exist is because that's what appears on your nation page so the game already has a reason to generate them anyway. Practically anyone using the API rather than just casually browsing the site will almost always want reliable, nonrandom data.
Yay, thanks![violet] wrote:Added as shard "notables".
Almost? That's exactly what I said.SherpDaWerp wrote:That said, I would almost say picking them all and choosing your own is generally a better approach for a user than requesting pre-formatted versions,
[violet] wrote:Added "admirables" shard, too.
Indian andhra wrote:https://www.nationstates.net/cgi-bin/api.cgi?a=sendTG&client=(Client Key)&tgid=(TGID)&key=(Secret Key)&to=(nation_name) this is not working it shows client not registered how I set it I filled all spaces
Glen-Rhodes wrote:Would it be possible to include a "natives" shard in the region API, listing which nations count as "natives" for poll purposes?
Glen-Rhodes wrote:Would it be possible to include a "natives" shard in the region API, listing which nations count as "natives" for poll purposes?
You have to check in two separate calls:Balasai wrote:https://www.nationstates.net/cgi-bin/api.cgi?nation=balasai&indian_andhra&q=tgcanrecruit&from=india I want to check for two nations but cannot how to do so
Region Control wrote:Natives: Nations that possess more Regional Influence here than in any other region.
The Northern Light wrote:Bug report/request
Hi,
Recently, there have been at least two times when the event IDs in the World Happenings API were reset (I believe one was during the Zombie Apocalypse, and the second some time in the second half of November).
This has been very disruptive for my NS script ecosystem, resulting in most of them going idle for several days until I noticed and reset them. I was taking some time today to try and make my logging system more robust to such incidents, and realized that the root cause of the problem is what looks like a bug, or at least unexpected behavior, in the World Happenings API. Let me use an example to describe the issue:
Let's say I make a world happenings API call, fetch some happenings, and extract from them 123456 as the latest event ID. Then, event IDs are reset to a number smaller than that, say, 10. Then I make another world happenings API call, and use the modifier "sinceid=123456". Because of the reset, the call will return no happenings.
My guess is that "sinceid" assumes that event IDs are monotonically increasing. When this monotonicity assumption is broken (e.g., during the reset events), "sinceid" won't behave as expected.
As I said above, I believe this should be classified as a bug. It would be very convenient if this could be fixed, as it would mean that event ID resetting would not disrupt happenings logging scripts.
Thanks in advance.