Advertisement
by Dowaesk » Sun Jun 13, 2021 9:59 am
by Sedgistan » Sun Jun 13, 2021 10:48 am
Dowaesk wrote:Is this the place to ask why a certain player could have gotten banned?
by SherpDaWerp » Sun Jun 20, 2021 9:09 pm
by Trotterdam » Sun Jun 20, 2021 10:04 pm
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>.
by SherpDaWerp » Sun Jun 20, 2021 10:26 pm
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>
by Trotterdam » Sun Jun 20, 2021 11:05 pm
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.
by [violet] » Mon Jun 21, 2021 6:19 pm
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.
by SherpDaWerp » Mon Jun 21, 2021 7:16 pm
[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.
by Trotterdam » Mon Jun 21, 2021 11:38 pm
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,
by SherpDaWerp » Wed Jun 23, 2021 1:05 am
[violet] wrote:Added "admirables" shard, too.
by Merni » Mon Jun 28, 2021 5:12 am
Balasai wrote:I need an api shard which gives the rating index like wood chipping index without ranks
by Indian andhra » Thu Jul 08, 2021 12:50 am
by Merni » Thu Jul 08, 2021 1:03 am
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
by Valentine Z » Fri Jul 09, 2021 9:45 am
♪ If you are reading my sig, I want you to have the best day ever ! You are worth it, do not let anyone get you down ! ♪
Glory to De Geweldige Sierlijke Katachtige Utopia en Zijne Autonome Machten ov Valentine Z !
(✿◠‿◠) ☆ \(^_^)/ ☆
♡ Issues Thread ♡ Photography Stuff ♡ Project: Save F7. ♡ Stats Analysis ♡
♡ The Sixty! ♡ Valentian Stories! ♡ Gwen's Adventures! ♡
• Never trouble trouble until trouble troubles you.
• World Map is a cat playing with Australia.
by Kringalia » Sat Jul 10, 2021 1:29 pm
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?
by WayNeacTia » Fri Jul 16, 2021 11:38 pm
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?
RiderSyl wrote:You'd really think that defenders would communicate with each other about this. I know they're not a hivemind, but at least some level of PR skill would keep Quebecshire and Quebecshire from publically contradicting eac
wait
by Flanderlion » Fri Jul 16, 2021 11:51 pm
by Balasai » Sun Jul 18, 2021 3:26 am
by Trotterdam » Sun Jul 18, 2021 5:50 am
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
by Kringalia » Sun Jul 18, 2021 3:49 pm
Region Control wrote:Natives: Nations that possess more Regional Influence here than in any other region.
by Merni » Wed Aug 11, 2021 2:02 am
by Eluvatar » Fri Aug 13, 2021 12:48 pm
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.
by Reich Hungary » Sat Aug 14, 2021 7:59 am
Advertisement
Users browsing this forum: -Abrahamia-, Bali Kingdom, Demonic Gate, Ecclestia, Germany of Chalegre, James R Kennedy, Norwegian FOREST Cat, Osmauri, Ostrovskiy, Quebecshire, The Endless Eventide, The Koryoan Union, United Orange Valley States, Watermelon Cat
Advertisement