NATION

PASSWORD

Card queries page

The place to wheel and deal, talk shop, and build up your dream deck!
User avatar
The Northern Light
Attaché
 
Posts: 68
Founded: Oct 10, 2014
Authoritarian Democracy

Card queries page

Postby The Northern Light » Sun Aug 04, 2019 1:47 am

To make it easier to parse the official XML list of cards, we made the following page:

Card Queries

It allows you to query the XML list for cards satisfying different criteria. The page describes the various criteria you can use, and how to combine them to form more complicated queries.

For example, to get all the cards of region "The North Pacific", with the WA badge but without the delegate badge, and of uncommon rarity, you can use the query:
+region:the_north_pacific, +badge:wa, -badge:delegate,+ rarity:uncommon
Then this will give you a list (IDs and links) of the 243 cards satisfying the above criteria.

All comments are welcome, including suggestions for new query options, changes in the formatting of results, or any bugs you notice.

Many thanks to Ballotonia for making the original XML list available!

The page also supports direct GET requests. The example query above corresponds to the URL:

http://azure.nsr3n.info/card_queries/ge ... mit=submit

You can of course use your favorite tool to make GET requests. Please, however, don't bombard the server with dozens of these.
Last edited by The Northern Light on Sun Aug 04, 2019 1:53 am, edited 2 times in total.

User avatar
9003
Envoy
 
Posts: 216
Founded: Oct 25, 2012
Psychotic Dictatorship

Postby 9003 » Sun Aug 04, 2019 7:30 am

Thanks for this super helpful
proud member of PETZ people for the Ethical Treatment of Zombies

User avatar
SherpDaWerp
Spokesperson
 
Posts: 105
Founded: Mar 02, 2016
Civil Rights Lovefest

Postby SherpDaWerp » Mon Aug 05, 2019 1:07 am

Quick issue: querying
Code: Select all
+badge:Issues Author
retrieves only nations with "Issues Author", and not "Issues Author (x2)", and so on. And then you can't actually query
Code: Select all
+badge:Issues Author (x2)
which might be something to do with the brackets? Point being, there's no way to search for people who have authored more than one issue.
I have the No Sex policy. For clarification: recreational sex is allowed, just not reproductive sex.

Candlewhisper Archive wrote:That is to say, the point has not only been missed, but you've used your crossbow to shoot yourself in the ass.

User avatar
The Northern Light
Attaché
 
Posts: 68
Founded: Oct 10, 2014
Authoritarian Democracy

Postby The Northern Light » Mon Aug 05, 2019 1:13 am

Thanks. It should be fixed now. Searching for "Issues author" should get you everyone with that badge, regardless of number of issues they've authored.

The same problem used to affect the various WA authorship categories, those should be fixed as well.
Last edited by The Northern Light on Mon Aug 05, 2019 1:16 am, edited 2 times in total.

User avatar
Philomathia
Secretary
 
Posts: 31
Founded: Feb 15, 2017
Inoffensive Centrist Democracy

Postby Philomathia » Mon Aug 05, 2019 9:11 pm

What are categories? Is that going to be something like all car cards or anime cards etc?
Last edited by Philomathia on Mon Aug 05, 2019 9:12 pm, edited 1 time in total.

User avatar
Ter Voland
Lobbyist
 
Posts: 21
Founded: Feb 14, 2018
Capitalist Paradise

Postby Ter Voland » Tue Aug 06, 2019 9:38 am

Philomathia wrote:What are categories? Is that going to be something like all car cards or anime cards etc?

Category is what kind of nation it is, like left wing utopia, inoffensive centrist democracy, etc. You have to use underscores instead of spaces for the query. An example would be +category:capitalist_paradise. Don't include the period. I doubt car or anime cards would be a category because they're not a built in option like left wing utopia.
Last edited by Ter Voland on Tue Aug 06, 2019 9:57 am, edited 3 times in total.

User avatar
The Northern Light
Attaché
 
Posts: 68
Founded: Oct 10, 2014
Authoritarian Democracy

Postby The Northern Light » Tue Aug 06, 2019 12:55 pm

Ter Voland wrote:You have to use underscores instead of spaces for the query.

Just a note that this is not necessary. The page should give correct results regardless of capitalization and spaces vs underscores (in fact, you can also mix spaces and underscores if you want).

User avatar
Ter Voland
Lobbyist
 
Posts: 21
Founded: Feb 14, 2018
Capitalist Paradise

Postby Ter Voland » Tue Aug 06, 2019 1:57 pm

The Northern Light wrote:
Ter Voland wrote:You have to use underscores instead of spaces for the query.

Just a note that this is not necessary. The page should give correct results regardless of capitalization and spaces vs underscores (in fact, you can also mix spaces and underscores if you want).

Ah ok. I just assumed that spaces wouldn't work.

User avatar
The Northern Light
Attaché
 
Posts: 68
Founded: Oct 10, 2014
Authoritarian Democracy

Postby The Northern Light » Sat Aug 10, 2019 4:13 am

The card queries page has been updated to allow searching cards by trophies, either their type, or rank, or both. See the page for instructions.

I've also made queries faster, so some that used to require around 10 seconds should now be done in less than a second.

User avatar
The Northern Light
Attaché
 
Posts: 68
Founded: Oct 10, 2014
Authoritarian Democracy

Postby The Northern Light » Sun Aug 25, 2019 4:28 pm

The card queries page has been updated to include both card IDs and names in the results.

The results are still sorted by card ID.

As always, all comments are welcome.

User avatar
The Northern Light
Attaché
 
Posts: 68
Founded: Oct 10, 2014
Authoritarian Democracy

Postby The Northern Light » Sat Sep 07, 2019 5:51 pm

The card queries page has been updated to allow searching cards based on whether their name includes or does not include a query string.

User avatar
Nopspri
Attaché
 
Posts: 70
Founded: Jul 30, 2012
Capitalist Paradise

Postby Nopspri » Sat Sep 14, 2019 8:05 pm

What would I put in to find a specific exnation card?

User avatar
The Northern Light
Attaché
 
Posts: 68
Founded: Oct 10, 2014
Authoritarian Democracy

Postby The Northern Light » Sun Sep 15, 2019 2:32 pm

It depends. What information do you have about the nation?

For example, if you remember that the nation's name contains the string NAMESTRING, you can do:

Code: Select all
+exnation, +name:NAMESTRING


Advertisement

Remove ads

Return to Trading Cards

Who is online

Users browsing this forum: No registered users

Advertisement

Remove ads