Page 88 of 97

PostPosted: Sun Jun 13, 2021 9:59 am
by Dowaesk
Is this the place to ask why a certain player could have gotten banned?

PostPosted: Sun Jun 13, 2021 10:48 am
by Sedgistan
Dowaesk wrote:Is this the place to ask why a certain player could have gotten banned?

No. And if you read anything in this thread you'd realise that.

There isn't any place to ask that question, as it's not information we're going to disclose to you.

PostPosted: Sun Jun 20, 2021 9:09 pm
by SherpDaWerp
Thought of this while typing up a response in one of the new managerial threads.

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.

EDIT: If redoing that code to make displaying all of them simultaneously requires a full rewrite, it would also be nice if "notable" (and perhaps a new "sensibility" shard) was displayed as a single value rather than a set of three sentence-formatted values, in line with the admirable shard. At the moment, they all just return the exact <thing> that gets concatenated into the homepage paragraph, which is a bit icky to deformat as a user.

PostPosted: Sun Jun 20, 2021 10:04 pm
by Trotterdam
I also mentioned this request here

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.
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).

The q=notable shard displays the comma-separated-list-of-three because that's how it's actually shown on your nation page.
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>.

PostPosted: Sun Jun 20, 2021 10:26 pm
by SherpDaWerp
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).
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. :unsure:

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.
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:<I don't think there's an API shard for this one, it's a one-word description of your size>
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.

So in hindsight, all three are actually displayed as-retrieved directly from a nation page, which I guess makes sense. But if redoing the three involves separating whatever code so that you can get them all instead of just calling whatever homepage-subroutine that gets values and formats them, then it would make sense for the three "singular" shards to return just one value with no formatting.

PostPosted: Sun Jun 20, 2021 11:05 pm
by Trotterdam
SherpDaWerp wrote:it would make sense for the three "singular" shards to return just one value with no formatting.
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.

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.

PostPosted: Mon Jun 21, 2021 6:19 pm
by [violet]
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.

Added as shard "notables".

PostPosted: Mon Jun 21, 2021 7:16 pm
by SherpDaWerp
[violet] wrote:Added as shard "notables".

Sweet, thanks! Although, no "admirables" with it?

I'm eligible for 18 of them, which is honestly a few more than I expected. I still support expanding the list, though. ;)

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.

You make a good point, I was thinking more about "make them all identical" than any other reasonable deciding factor, like processing effort or use-cases. 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, because that would allow you to make your own sentences with them instead of exactly copying the gameside homepage.

PostPosted: Mon Jun 21, 2021 11:38 pm
by Trotterdam
[violet] wrote:Added as shard "notables".
Yay, thanks!

I'm using this now and it seems to work perfectly.

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,
Almost? That's exactly what I said.

Although this discussion is moot point now since we already got what we wanted! Yay!

Well, half of what we wanted. I also support the addition of a q=admirables shard for completion's sake, but unlike q=notables, I have no intention to make use of it myself. So I'm happy now.

PostPosted: Wed Jun 23, 2021 12:48 am
by [violet]
Added "admirables" shard, too.

PostPosted: Wed Jun 23, 2021 1:05 am
by SherpDaWerp
[violet] wrote:Added "admirables" shard, too.

Wonderful news, thanks.

PostPosted: Mon Jun 28, 2021 3:00 am
by Balasai
I need an api shard which gives the rating index like wood chipping index without ranks

PostPosted: Mon Jun 28, 2021 5:12 am
by Merni
Balasai wrote:I need an api shard which gives the rating index like wood chipping index without ranks

See here.

PostPosted: Thu Jul 08, 2021 12:50 am
by Indian andhra
https://www.nationstates.net/cgi-bin/ap ... nt=(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

PostPosted: Thu Jul 08, 2021 1:03 am
by Merni
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

Check whether your client key is correctly typed as you received it from the mods.
Also, in most cases it is much easier to use one of the existing Telegram API clients, rather than making requests manually yourself. This thread has all the information you need on the Telegram API and various clients available.

PostPosted: Fri Jul 09, 2021 9:45 am
by Valentine Z
I would like to make a humble request regarding the Policies shard. https://www.nationstates.net/cgi-bin/api.cgi?nation=testlandia&q=policies

As of now, it only shows the policies that a nation has, not what it does not have. So, I was wondering if there is perhaps a way that is feasible to have a shard "all_policies" or something to that effect, alongside a value of 0 for that nation not having that policy, and 1 for having that policy (i.e. binary representation).

For example, 0 0 0 1 1 if you want to show that the nation has the last 2 policies.

-----

For the next data trawl, I can still do Python and XML wizadry to get what I want, but given how different nations have different numbers of policies, this will help me quite a fair bit of not having to deal with those different lengths. Thanks! ♥

PostPosted: Sat Jul 10, 2021 1:29 pm
by Kringalia
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?

Is there any chance this could be added? A way to check if a nation counts as a "native" and/or list all nations in a region that count as "native" would definitely be helpful.

PostPosted: Fri Jul 16, 2021 11:38 pm
by WayNeacTia
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?

How exactly do you define a "native"? The only real native to a region is the founder, and even then they were spawned in a feeder.

PostPosted: Fri Jul 16, 2021 11:51 pm
by Flanderlion
Wayneactia wrote:
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?

How exactly do you define a "native"? The only real native to a region is the founder, and even then they were spawned in a feeder.

The same way as the game defines natives for polls - given this is about polls, and polls have a native option.

About tg can recurit

PostPosted: Sun Jul 18, 2021 3:26 am
by Balasai
https://www.nationstates.net/cgi-bin/ap ... from=india I want to check for two nations but cannot how to do so

PostPosted: Sun Jul 18, 2021 5:50 am
by Trotterdam
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
You have to check in two separate calls:
https://www.nationstates.net/cgi-bin/api.cgi?nation=balasai&q=tgcanrecruit&from=india
https://www.nationstates.net/cgi-bin/api.cgi?nation=indian_andhra&q=tgcanrecruit&from=india
You can only retrieve data from one nation at a time. (You can retrieve multiple pieces of data about the same nation in a single call, though, if there's anything else you happen to be interested in.) If you're making multiple calls, make sure to obey ratelimits, although this only matters once you exceed 50 calls total.

PostPosted: Sun Jul 18, 2021 3:49 pm
by Kringalia
Wayneactia wrote:
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?

How exactly do you define a "native"? The only real native to a region is the founder, and even then they were spawned in a feeder.

A "native" is defined in the Region Control page as:
Region Control wrote:Natives: Nations that possess more Regional Influence here than in any other region.

An option to check if a nation qualifies as native, or to list native nations in a region, would be really helpful, for example to let anyone check their eligibility for poll-based elections in the South Pacific.

PostPosted: Wed Aug 11, 2021 2:02 am
by Merni
Could the list of API shards included in the Daily Dumps, and in the general query (such as https://www.nationstates.net/cgi-bin/ap ... tion=Merni ) be added to the API documentation page? I often have to download the dump and use a command to output the first few lines to find which exact shards are included in it, and including this info in the docs would be very helpful. Especially for the dumps, where you often can't open them straightaway in an editor due to their size.

PostPosted: Fri Aug 13, 2021 12:48 pm
by Eluvatar
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.


As a note, the happenings API has experienced yet another happenings ID reset. Sorry about that!

I my Ex-Nation please password send from e-mail link . !

PostPosted: Sat Aug 14, 2021 7:59 am
by Reich Hungary
Draycora please password send for e-mail , please send to me under [redacted]@gmail.com new password ex-nation !