public interface INationStates
| Modifier and Type | Method and Description |
|---|---|
void |
doVersionCheck()
Performs a simple version check, logging the results in the console.
|
NationQuery |
getNation(String nationName)
Starts building a nation query, using the given nation name.
|
NationDumpQuery |
getNationDump(DailyDumpMode mode)
Starts building a query that retrieves the daily nation dump.
|
RegionQuery |
getRegion(String regionName)
Starts building a region query, using the given region name.
|
RegionDumpQuery |
getRegionDump(DailyDumpMode mode)
Starts building a query that retrieves the daily region dump.
|
VersionQuery |
getVersion()
Starts building a query that retrieves the version number of the latest
live NationStates API.
|
WorldQuery |
getWorld(WorldShard... shards)
Starts building a world query, using the selected shards.
|
WorldAssemblyQuery |
getWorldAssembly(Council council)
Starts building a World Assembly query, using the selected council type.
|
void |
registerTypes(Class... types)
Adds the given classes to the JAXB context so that they can be parsed to
from retrieved XML responses and files.
|
TelegramQuery |
sendTelegrams(String clientKey,
String telegramId,
String secretKey,
String... nations)
Starts building a query that sends (a) telegram(s).
|
void |
setUserAgent(String userAgent)
Sets the User Agent.
|
VerifyQuery |
verifyNation(String nation,
String checksum)
Starts building a query that verifies a nation.
|
void setUserAgent(String userAgent)
userAgent - the User Agent to use for API callsIllegalArgumentException - if userAgent is null or empty.void doVersionCheck()
void registerTypes(Class... types)
types - the classes to add to the JAXB contextNationQuery getNation(String nationName)
nationName - name of the nation to queryRegionQuery getRegion(String regionName)
regionName - name of the region to queryWorldQuery getWorld(WorldShard... shards)
shards - the selected shardsWorldAssemblyQuery getWorldAssembly(Council council)
council - the council type to queryVersionQuery getVersion()
VerifyQuery verifyNation(String nation, String checksum)
nation - the nation to verifychecksum - the verification checksumTelegramQuery sendTelegrams(String clientKey, String telegramId, String secretKey, String... nations)
clientKey - the client keytelegramId - the telegram idsecretKey - the telegram's secret keynations - the nation(s) to send the telegram toRegionDumpQuery getRegionDump(DailyDumpMode mode)
mode - the daily dump mode to useNationDumpQuery getNationDump(DailyDumpMode mode)
mode - the daily dump mode to useCopyright © 2017. All rights reserved.