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
Praeceps
Diplomat
 
Posts: 757
Founded: Feb 08, 2016
Ex-Nation

Postby Praeceps » Sun Jan 06, 2019 2:56 pm

The Northern Light wrote:Request

Would it be possible to add a Nation API shard that returns information about the nation's card deck?

For example, the shard could return the nation's bank, and a list of cards the nation has, where for each card it reports its name, rarity, and season.

Thanks a lot!

I think this is a great idea!

I know a few regions discussing ways to use cards to increase integration and activity. Having an API shard would present us with more options to build on the mini-game.
Apparently simultaneously a Ravenclaw puppet, a NPO plant, and a Warden spy. I had no idea I was that good. Depending on who you ask, my aliases include Krulltopia.

Former Minister of Foreign Affairs for The North Pacific, Former Guildmaster of The North Pacific Cards Guild

User avatar
Vulturret
Diplomat
 
Posts: 625
Founded: Aug 23, 2017
Ex-Nation

Postby Vulturret » Sun Jan 06, 2019 9:00 pm

Request

I would like to request that the private API commands available (currently only pertaining or usable for answering issues) be expanded, at least to posting and editing dispatches. This would be highly beneficial to those of less... technically inclined, to put it nicely. This, along with a few other items (which would all also be beneficial, I'm sure) was requested by HMS Unicorn back in 2016, but was never implemented or formally addressed.

Being able to edit dispatches without having to make complicated scripts with storing login cookies and the like would be highly beneficial to players who have to maintain lots of dispatches that need to change frequently (and en masse), such as the integration dispatch or list of current officials. This would also benefit those who already do dispatches via HTML, as the scripts could go faster and not have to scrape the page.

[violet] has also said in the past that these commands will be added on a "squeaky wheel" basis, and I'm not sure if this has reached this stage yet, but it seems to have been requested several times, so coming close, for sure.

I should be grateful if this is considered. Thanks! :)

EDIT: Fixed erroneous link.
Last edited by Vulturret on Sun Jan 06, 2019 9:06 pm, edited 2 times in total.
Emperor of the Ragerian Imperium
Statsminister of Balder

Patriarch of House Griffin, High King of Domlar, King of Arin, King of Haggir, King of Don, King of Fola, Grand Duke of Jorn, High Patrician of Kola, Chieftain of the Amir, Warmaster of Alaan, Baselius of Tol, Samrat of Ayn, and Grand High Magistrate of Korrer
Member of the Storting of Balder
Styled Knight of Thor in Balder
Member of the Citizens' Assembly Advisory Board of Europeia
Minister of Culture of Europeia
Minister of Communications of Balder
Citizens' Assembly Chair of Europeia
Speaker of the Rejected Realms
Imperator of the Dark Vanquishers
Caliph of the Arabian Empire

User avatar
Imperium Anglorum
GA Secretariat
 
Posts: 12655
Founded: Aug 26, 2013
Left-Leaning College State

Postby Imperium Anglorum » Sat Jan 12, 2019 8:44 pm

When the API gives an option (known in the GA as Strength, Area of Effect; SC as nominee, target), sometimes it gives 0. What is this? And it occurs, I believe, in area of effect categories.

Author: 1 SC and 56+ GA resolutions
Maintainer: GA Passed Resolutions
Developer: Communiqué and InfoEurope
GenSec (24 Dec 2021 –); posts not official unless so indicated
Delegate for Europe
Elsie Mortimer Wellesley
Ideological Bulwark 285, WALL delegate
Twice-commended toxic villainous globalist kittehs

User avatar
Agadar
Powerbroker
 
Posts: 7784
Founded: Dec 06, 2009
Psychotic Dictatorship

Postby Agadar » Sun Jan 13, 2019 9:40 am

Is there a way to get the number of RMB pages? There is no available property for it on the Region resource, and it can't be derived from the Messages property.
Proud resident of The Western Isles, the #1 role-playing region!
Developer of Telegrammer, NS API Java Wrapper, and more!

User avatar
Imperium Anglorum
GA Secretariat
 
Posts: 12655
Founded: Aug 26, 2013
Left-Leaning College State

Postby Imperium Anglorum » Sun Jan 13, 2019 2:16 pm

Also, can we get legality information from the WA proposals API?

Author: 1 SC and 56+ GA resolutions
Maintainer: GA Passed Resolutions
Developer: Communiqué and InfoEurope
GenSec (24 Dec 2021 –); posts not official unless so indicated
Delegate for Europe
Elsie Mortimer Wellesley
Ideological Bulwark 285, WALL delegate
Twice-commended toxic villainous globalist kittehs

User avatar
Cardashian
Political Columnist
 
Posts: 2
Founded: Jan 04, 2019
Democratic Socialists

Postby Cardashian » Tue Jan 15, 2019 6:49 am

The Northern Light wrote:Request

Would it be possible to add a Nation API shard that returns information about the nation's card deck?

For example, the shard could return the nation's bank, and a list of cards the nation has, where for each card it reports its name, rarity, and season.

Thanks a lot!


So much this. At the moment, when I want to see if I have cards from a certain region, I have to go through all my cards, open them, etc.

Also, I'd like a way to know which card is in most collections. But that is more the statistic geek in me :ugeek:

-Blaat on a puppet

User avatar
Darcania
Envoy
 
Posts: 205
Founded: Dec 29, 2014
Civil Rights Lovefest

Postby Darcania » Mon Jan 21, 2019 9:29 pm

The Northern Light wrote:Request

Would it be possible to add a Nation API shard that returns information about the nation's card deck?

For example, the shard could return the nation's bank, and a list of cards the nation has, where for each card it reports its name, rarity, and season.

Thanks a lot!

I would definitely love this - it would make a most lovely addition to any Discord server if I could code the bots to give info about a nation's card deck, as well as info on the nation's card itself.

User avatar
Leppikania
Minister
 
Posts: 2332
Founded: Apr 13, 2015
Left-wing Utopia

Postby Leppikania » Thu Feb 14, 2019 4:31 pm

Is there an XML schema for the API anywhere?
INTP, -4.25 Economic Left/Right, -4.1 Social Libertarian/Authoritarian, tastes like chicken.
I do use NS stats, thank you very much.
Funny Quotes
Pie charts for industries
Request an Embassy

User avatar
Trotterdam
Postmaster-General
 
Posts: 10541
Founded: Jan 12, 2012
Left-Leaning College State

Postby Trotterdam » Thu Feb 14, 2019 11:52 pm

As far as I know, the only way to tell the format of the API results is to just test it and see what you get. The format is pretty rigid, so once you've seen an example or two you should know what to expect.

That's inconvenient for the private commands, since they're not something you can just test without side effects.

User avatar
Darcania
Envoy
 
Posts: 205
Founded: Dec 29, 2014
Civil Rights Lovefest

Postby Darcania » Fri Feb 15, 2019 5:00 pm

Trotterdam wrote:That's inconvenient for the private commands, since they're not something you can just test without side effects.

I'd recommend the use of a test puppet nation for testing private shards.

User avatar
Karteria
Envoy
 
Posts: 226
Founded: Jun 28, 2018
Ex-Nation

Postby Karteria » Sun Mar 03, 2019 9:14 am

Not sure if I had to make a separate topic for this question – but if my region already has an API Client Key for recruitment, can I get a new one for WA Campaigning, or do I have to use the same one?

Probably didn't read close enough.
World Assembly Delegate for the New West Indies region.

User avatar
Frisbeeteria
Senior Game Moderator
 
Posts: 27796
Founded: Dec 16, 2003
Capitalizt

Postby Frisbeeteria » Sun Mar 03, 2019 4:14 pm

Karteria wrote:if my region already has an API Client Key for recruitment, can I get a new one for WA Campaigning, or do I have to use the same one?

Use the same one.

Only one key can be issued per region. That's why people who want to campaign from large regions like GCRs get asked to use a puppet to found a region just for the key.

User avatar
Caelapes
Ambassador
 
Posts: 1543
Founded: Apr 30, 2007
Ex-Nation

Postby Caelapes » Tue Mar 05, 2019 6:15 am

Crossposting this in the appropriate thread:

Caelapes wrote:Is there any way that these silent DEATs could show in the API Happenings but still be hidden from the Activity page?
    
The Rose Commune of Caelapes
Ego vero custos fratris mei sum.
aka Misley

User avatar
The Blaatschapen
Technical Moderator
 
Posts: 63226
Founded: Antiquity
Anarchy

Postby The Blaatschapen » Tue Mar 05, 2019 7:33 am

Caelapes wrote:Crossposting this in the appropriate thread:

Caelapes wrote:Is there any way that these silent DEATs could show in the API Happenings but still be hidden from the Activity page?


What's your use case?
The Blaatschapen should resign

User avatar
Caelapes
Ambassador
 
Posts: 1543
Founded: Apr 30, 2007
Ex-Nation

Postby Caelapes » Tue Mar 05, 2019 12:19 pm

The blAAtschApen wrote:
Caelapes wrote:Crossposting this in the appropriate thread:



What's your use case?

I'm also more broadly in favor of a flag in Happenings that shows that a nation CTEing was from a DEAT (which could be used to separate DEATs that are handed down during update from update time-signifying CTEs), but the use case here is to properly update a nation database when nations CTE instead of having to compare against the next daily dump, which is imperfect.
    
The Rose Commune of Caelapes
Ego vero custos fratris mei sum.
aka Misley

User avatar
Frisbeeteria
Senior Game Moderator
 
Posts: 27796
Founded: Dec 16, 2003
Capitalizt

Postby Frisbeeteria » Tue Mar 05, 2019 6:51 pm

The majority of DEATs are new nations with offensive or abusive nation names. Next most common is DOS puppets. We don't really want to publish info on either. Do you really need to track "NS_Mods_Suck_Donkey_Dick" and all the variations? I'm seeing more negatives than positives in including that data in the dumps.

User avatar
Caelapes
Ambassador
 
Posts: 1543
Founded: Apr 30, 2007
Ex-Nation

Postby Caelapes » Tue Mar 05, 2019 7:26 pm

Frisbeeteria wrote:The majority of DEATs are new nations with offensive or abusive nation names. Next most common is DOS puppets. We don't really want to publish info on either. Do you really need to track "NS_Mods_Suck_Donkey_Dick" and all the variations? I'm seeing more negatives than positives in including that data in the dumps.

I would argue that the API (again, I'm not advocating for this being included in the game-side Activity page) isn't really "publishing info" on DEATed nations with offensive names any more than the Boneyard is - perhaps less so, given how few players use the API compared to the Boneyard.

And this isn't about tracking which nations are deleted by moderators so much as it is being able to filter out DEATs and also be able to update a nation table to remove inactive nations - which could be done by comparing against data dumps, but that's not always fully perfect, either.
    
The Rose Commune of Caelapes
Ego vero custos fratris mei sum.
aka Misley

User avatar
The Northern Light
Spokesperson
 
Posts: 156
Founded: Oct 10, 2014
Iron Fist Consumerists

Postby The Northern Light » Tue Mar 12, 2019 8:14 pm

The Northern Light wrote:Request

Would it be possible to add a Nation API shard that returns information about the nation's card deck?

For example, the shard could return the nation's bank, and a list of cards the nation has, where for each card it reports its name, rarity, and season.

Thanks a lot!

Hi,

I'd like to bump this request. I feel like having this API shard would greatly enhance the cards game, by allowing regions to run their own regional showcases, contests, and so on. I know for a fact that TNP has been discussing a large number of cards-related events and infrastructure, which would greatly benefit from (or only be possible if) this shard being added to the API. I assume we are not the only region to be considering this.

Thanks again for the consideration.
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
Ever-Wandering Souls
Negotiator
 
Posts: 7267
Founded: Jan 01, 2014
Father Knows Best State

Postby Ever-Wandering Souls » Sun Mar 24, 2019 8:55 pm

The Northern Light wrote:
The Northern Light wrote:Request

Would it be possible to add a Nation API shard that returns information about the nation's card deck?

For example, the shard could return the nation's bank, and a list of cards the nation has, where for each card it reports its name, rarity, and season.

Thanks a lot!

Hi,

I'd like to bump this request. I feel like having this API shard would greatly enhance the cards game, by allowing regions to run their own regional showcases, contests, and so on. I know for a fact that TNP has been discussing a large number of cards-related events and infrastructure, which would greatly benefit from (or only be possible if) this shard being added to the API. I assume we are not the only region to be considering this.

Thanks again for the consideration.


R3N builds amazing things when enabled to. Support.
Proud Raider; General of The Black Hawks, Ret.
TG me anytime; I'm always happy to talk about anything!

The Alicorns (Equestria) wrote:Let them stay, no need to badmouth them...From our view a bunch of nations just came in, seized the delegate position, and changed a few superficial things...we play NationStates differently...there's really no reason for us to be butthurt.
http://www.nationstates.net/page=rmb/postid=8944227
http://www.nationstates.net/page=rmb/postid=8951258

Misley wrote:
Hobbesistan wrote:Don't think I understand the question.
The color or what?..

Jesus, Hobbes, it's 2015. You can't just call someone "the color".

Reploid Productions wrote:Raiders are endlessly creative

How Do I Telegram API?

Omnis delenda est.

User avatar
The Northern Light
Spokesperson
 
Posts: 156
Founded: Oct 10, 2014
Iron Fist Consumerists

Postby The Northern Light » Sun Mar 24, 2019 10:41 pm

More generally, it would be amazing if there were some more comprehensive API support for cards. I imagine that this could be setup as a separate category, or part of the "World" category.

In addition to the above mentioned call producing information about a nation's deck, here are a few more things I would love to be able to use:

1) q=card;cardid=XXXX: This shard can be used to pull basic data about a specific card, e.g., rarity, market value, number of owners, etc. Additional options can be used to get specific bits of information, e.g., owners, transactions, and finds.

2) q=trades: It would return information about completed trades. This could work similar to the happenings stream, allowing users to set time ranges using timestamps or trade IDs.

3) q=cards: It would return a list of the top-valued cards.

4) q=decks: It would return a list of the top-valued decks.

As I stated in my previous post(s), this kind of API functionality could greatly facilitate regional programs. Regions, or groups of regions, could start setting up their own micro-markets, internal rankings, competitions, and so on.

Additionally, the above would allow those of us interested in the more quantitative side of things to start compiling and publishing statistics about the status of both regional and global markets: What is the total amount of legendaries available? How are average prices per rarity changing over time? What is the daily volume of transactions? How many unique nations are taking part? And so on.
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
Leppikania
Minister
 
Posts: 2332
Founded: Apr 13, 2015
Left-wing Utopia

Postby Leppikania » Sat Mar 30, 2019 3:11 pm

Is there a way to get an autologin key without using the X-Password header? Like, say, a particular hash function?
INTP, -4.25 Economic Left/Right, -4.1 Social Libertarian/Authoritarian, tastes like chicken.
I do use NS stats, thank you very much.
Funny Quotes
Pie charts for industries
Request an Embassy

User avatar
The Northern Light
Spokesperson
 
Posts: 156
Founded: Oct 10, 2014
Iron Fist Consumerists

Postby The Northern Light » Sun Jun 09, 2019 10:50 am

The Northern Light wrote:
HMS Unicorn wrote:Would it be possible to revisit this suggestion?

It was brought up here, and several players mentioned they would benefit from the addition. But the discussion soon digressed to including LASTUPDATE in the dumps.

It'd save me a few dozens of thousands of API calls per day, and I imagine it's the same for many other players.

I'd like to bump this request. Adding the SPDR metric in the national dumps would be enormously useful for a large swath of (at least) gameplayers, who frequently need to comb through influence statistics for various purposes (regional security, R/D, WA and endotarting promotion, etc.).

Given that compiling influence statistics often requires fetching the SPDR of entire region populations one nation at a time, it would save both the players and the server a considerable amount of API bandwidth.

The nation dumps already include a few other censuses in various forms, namely CENSUSIDs 0, 1, 2, 3, and 49 (there is also a "PUBLICSECTOR" field for which I could not determine whether it corresponds to a CENSUSID). I understand that at least the first four are "special" censuses (respectively: the three censuses that determine a nation's category, and population). I'd argue that SPDR is also special, given its role in determining the feasibility/outcome of many gameplay actions. Therefore, it should be included in the nation dumps, just as CENSUSIDs 0-3 are.

Hi,

Is there any chance that this request could be considered?
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
Bluelight-R006
Senator
 
Posts: 4317
Founded: Mar 31, 2017
Civil Rights Lovefest

Postby Bluelight-R006 » Wed Jun 19, 2019 2:14 am

I’m new to API, and I’m curious, because we can’t use a script to send telegrams from the regular telegrams page, then where do we send them from?

User avatar
Phydios
Minister
 
Posts: 2567
Founded: Dec 06, 2014
Left-Leaning College State

Postby Phydios » Wed Jun 19, 2019 6:29 am

Bluelight-R006 wrote:I’m new to API, and I’m curious, because we can’t use a script to send telegrams from the regular telegrams page, then where do we send them from?

You use the Telegram API, along with a computer program to call the API.
If you claim to be religious but don’t control your tongue, you are fooling yourself, and your religion is worthless. Pure and genuine religion in the sight of God the Father means caring for orphans and widows in their distress and refusing to let the world corrupt you. | Not everyone who calls out to me, ‘Lord! Lord!’ will enter the Kingdom of Heaven. Only those who actually do the will of my Father in heaven will enter. On judgment day many will say to me, ‘Lord! Lord! We prophesied in your name and cast out demons in your name and performed many miracles in your name.’ But I will reply, ‘I never knew you. Get away from me, you who break God’s laws.’
James 1:26-27, Matthew 7:21-23

User avatar
Radical Republic
Civil Servant
 
Posts: 10
Founded: Jun 20, 2018
New York Times Democracy

Postby Radical Republic » Thu Jun 20, 2019 9:23 pm

I'm sure this has already been asked on here but I don't have the time to read trough 77 pages of forums. My api isn't sending the recruitment telegrams. I'm using the key that I got from the previous user and the test telegram worked. Help?

PreviousNext

Advertisement

Remove ads

Return to Technical

Who is online

Users browsing this forum: Americalatina, Aurora Islands, Graalstone, Riemstagrad, Winx club

Advertisement

Remove ads