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
Bureaucrat
 
Posts: 53
Founded: Feb 08, 2016
Inoffensive Centrist Democracy

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.

Deputy Minister of Foreign Affairs and Senior Diplomat for The North Pacific, Former Minister of Foreign Affairs.

User avatar
Vulturret
Diplomat
 
Posts: 623
Founded: Aug 23, 2017
Iron Fist Consumerists

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
Powerbroker
 
Posts: 8523
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 26 GA resolutions
Maintainer: GA Passed Resolutions
Developer: Communiqué and InfoEurope
Delegate for Europe
Out-of-character unless marked otherwise
Ideological Bulwark 285, WALL delegate

User avatar
Agadar
Powerbroker
 
Posts: 7754
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
Powerbroker
 
Posts: 8523
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 26 GA resolutions
Maintainer: GA Passed Resolutions
Developer: Communiqué and InfoEurope
Delegate for Europe
Out-of-character unless marked otherwise
Ideological Bulwark 285, WALL delegate

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
Spokesperson
 
Posts: 104
Founded: Dec 29, 2014
Left-wing Utopia

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: 2283
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
Negotiator
 
Posts: 7198
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
Spokesperson
 
Posts: 104
Founded: Dec 29, 2014
Left-wing Utopia

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
Attaché
 
Posts: 84
Founded: Jun 28, 2018
Left-wing Utopia

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.

References: | Wiki | WA Platform | NS Stats | Regional World Assembly Affairs |

User avatar
Frisbeeteria
Senior Game Moderator
 
Posts: 23252
Founded: Dec 16, 2003
Anarchy

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: 1496
Founded: Apr 30, 2007
Liberal Democratic Socialists

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
Retired Moderator
 
Posts: 52066
Founded: Antiquity
Forumer Mod

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?
Former mod, now a rocker mocker. Thank you Ringo
Heaven is other people
Behind the invisible hand of the market hides the iron fist of the state.
Whenever you find yourself on the side of the majority, it is time to pause and reflect - Mark Twain
Silent is an anagram of listen.
Proud adopter of a lamb called violet: http://imgur.com/a/pxnSf
Male. Please address me as 'he'.
This is the 8th line. If your sig is longer than mine, it is too long.

User avatar
Caelapes
Ambassador
 
Posts: 1496
Founded: Apr 30, 2007
Liberal Democratic Socialists

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: 23252
Founded: Dec 16, 2003
Anarchy

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: 1496
Founded: Apr 30, 2007
Liberal Democratic Socialists

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
Secretary
 
Posts: 37
Founded: Oct 10, 2014
Moralistic Democracy

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.

User avatar
Ever-Wandering Souls
Negotiator
 
Posts: 6191
Founded: Jan 01, 2014
Inoffensive Centrist Democracy

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
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
Secretary
 
Posts: 37
Founded: Oct 10, 2014
Moralistic Democracy

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.

Previous

Advertisement

Remove ads

Return to Technical

Who is online

Users browsing this forum: Third Asopia, WOOF SAUSAGEIAN

Advertisement

Remove ads