Data Reference

Note

The following documents every data class modelled by the library and all its potential attributes, it will only have the attributes queried, attempting to access unqueried (and therefore non-existent) attributes will result in it raising an AttributeError or a KeyError depending on the context.

Alliance

class pnwkit.data.Alliance(data: Mapping[str, Any])

Represents an alliance.

id

The alliance ID.

Type

str

name

The alliance name.

Type

str

acronym

The alliance acronym.

Type

str

score

The alliance score.

Type

float

color

The alliance color.

Type

str

nations

The alliance’s members.

Type

Tuple[Nation, …]

treaties

The alliance’s treaties.

Type

Tuple[Treaty, …]

acceptmem

Whether the alliance is accepting members or not.

Type

bool

flag

The alliance flag URL.

Type

str

The alliance forum link.

Type

str

The alliance Discord link.

Type

str

bankrecs

The alliance’s bank records. Will not contain alliance to alliance records if the querying key cannot view the alliance bank.

Type

Tuple[Bankrec, …]

taxrecs

The alliance’s tax records. Will be None if the querying key cannot view the alliance bank.

Type

Optional[Tuple[Bankrec, …]]

tax_brackets

The alliance’s tax brackets. Will be None if the querying key cannot view the alliance bank.

Type

Optional[Tuple[TaxBracket, …]]

money

The current amount of money in the alliance bank. Will be None if the querying key cannot view the alliance bank.

Type

Optional[float]

coal

The current amount of coal in the alliance bank. Will be None if the querying key cannot view the alliance bank.

Type

Optional[float]

oil

The current amount of oil in the alliance bank. Will be None if the querying key cannot view the alliance bank.

Type

Optional[float]

uranium

The current amount of uranium in the alliance bank. Will be None if the querying key cannot view the alliance bank.

Type

Optional[float]

iron

The current amount of iron in the alliance bank. Will be None if the querying key cannot view the alliance bank.

Type

Optional[float]

bauxite

The current amount of bauxite in the alliance bank. Will be None if the querying key cannot view the alliance bank.

Type

Optional[float]

lead

The current amount of lead in the alliance bank. Will be None if the querying key cannot view the alliance bank.

Type

Optional[float]

gasoline

The current amount of gasoline in the alliance bank. Will be None if the querying key cannot view the alliance bank.

Type

Optional[float]

munitions

The current amount of munitions in the alliance bank. Will be None if the querying key cannot view the alliance bank.

Type

Optional[float]

steel

The current amount of steel in the alliance bank. Will be None if the querying key cannot view the alliance bank.

Type

Optional[float]

aluminum

The current amount of aluminum in the alliance bank. Will be None if the querying key cannot view the alliance bank.

Type

Optional[float]

food

The current amount of food in the alliance bank. Will be None if the querying key cannot view the alliance bank.

Type

Optional[float]

to_dict()Dict[str, Any]

Get a dict representation of this data.

Returns

A dictionary of the data on the object.

Return type

Dict[str, Any]

ApiKeyDetails

Methods
class pnwkit.data.ApiKeyDetails(data: Mapping[str, Any])
to_dict()Dict[str, Any]

Get a dict representation of this data.

Returns

A dictionary of the data on the object.

Return type

Dict[str, Any]

Bankrec

class pnwkit.data.Bankrec(data: Mapping[str, Any])

Represents a bank record.

id

The bank record ID.

Type

str

date

The date the transaction was completed.

Type

str

sid

The ID of the sender.

Type

str

stype

The type of the sender. 1 corresponds to a Nation and 2 corresponds to a Alliance.

Type

int

rid

The ID of the receiver.

Type

str

rtype

The type of the receiver. 1 corresponds to a Nation and 2 corresponds to a Alliance

Type

int

pid

The nation ID of the banker.

Type

str

note

The transaction note.

Type

str

money

The money sent in the transaction.

Type

float

coal

The coal sent in the transaction.

Type

float

oil

The oil sent in the transaction.

Type

float

uranium

The uranium sent in the transaction.

Type

float

iron

The iron sent in the transaction.

Type

float

bauxite

The bauxite sent in the transaction.

Type

float

lead

The lead sent in the transaction.

Type

float

gasoline

The gasoline sent in the transaction.

Type

float

munitions

The munitions sent in the transaction.

Type

float

steel

The steel sent in the transaction.

Type

float

aluminum

The aluminum sent in the transaction.

Type

float

food

The food sent in the transaction.

Type

float

tax_id

The ID of the tax bracket.

Type

str

to_dict()Dict[str, Any]

Get a dict representation of this data.

Returns

A dictionary of the data on the object.

Return type

Dict[str, Any]

BBGame

class pnwkit.data.BBGame(data: Mapping[str, Any])

Represents a baseball game.

id

The game ID.

Type

str

date

The date of the game.

Type

str

home_id

The ID of the home team.

Type

str

away_id

The ID of the away team.

Type

str

home_team

The home team.

Type

BBTeam

away_team

The away team.

Type

BBTeam

home_nation_id

The ID of the home nation.

Type

str

away_nation_id

The ID of the away nation.

Type

str

home_nation

The home nation.

Type

Nation

away_nation

The away nation.

Type

Nation

stadium_name

The name of the stadium.

Type

str

home_score

The home team’s score.

Type

int

away_score

The away team’s score.

Type

int

sim_text

The simulation text.

Type

str

highlights

The game highlights.

Type

str

home_revenue

The home team’s revenue.

Type

float

spoils

The spoils.

Type

float

open

Honestly no idea what this one does.

Type

int

wager

The wager.

Type

float

to_dict()Dict[str, Any]

Get a dict representation of this data.

Returns

A dictionary of the data on the object.

Return type

Dict[str, Any]

BBPlayer

class pnwkit.data.BBPlayer(data: Mapping[str, Any])

Represents a baseball player.

id

The player ID.

Type

str

date

The date the player was created.

Type

str

nation_id

The ID of the nation the player belongs to.

Type

str

nation

The nation the player belongs to.

Type

Nation

team_id

The ID of the team the player belongs to.

Type

str

team

The team the player belongs to.

Type

BBTeam

name

The player’s name.

Type

str

age

The player’s age.

Type

int

position

The player’s position.

Type

str

pitching

The player’s pitching rating.

Type

float

batting

The player’s batting rating.

Type

float

speed

The player’s speed rating.

Type

float

awareness

The player’s awareness rating.

Type

float

overall

The player’s overall rating.

Type

float

birthday

The player’s birthday.

Type

int

to_dict()Dict[str, Any]

Get a dict representation of this data.

Returns

A dictionary of the data on the object.

Return type

Dict[str, Any]

BBTeam

class pnwkit.data.BBTeam(data: Mapping[str, Any])

Represents a baseball team.

id

The team ID.

Type

str

date

The date the team was created.

Type

str

nation_id

The ID of the nation the team belongs to.

Type

str

nation

The nation the team belongs to.

Type

Nation

name

The team’s name.

Type

str

The team’s logo.

Type

str

home_jersey

The team’s home jersey.

Type

str

away_jersey

The team’s away jersey.

Type

str

stadium

The team’s stadium.

Type

str

quality

The team’s quality rating.

Type

int

seating

The team’s seating rating.

Type

int

rating

The team’s overall rating.

Type

float

wins

The team’s number of wins.

Type

int

glosses

The team’s number of losses.

Type

int

runs

The team’s number of runs.

Type

int

homers

The team’s number of home runs.

Type

int

strikeouts

The team’s number of strikeouts.

Type

int

games_played

The team’s number of games played.

Type

int

games

The team’s games.

Type

Tuple[BBGame, …]

players

The team’s players.

Type

Tuple[BBPlayer, …]

to_dict()Dict[str, Any]

Get a dict representation of this data.

Returns

A dictionary of the data on the object.

Return type

Dict[str, Any]

Bounty

class pnwkit.data.Bounty(data: Mapping[str, Any])

Represents a bounty.

id

The bounty ID.

Type

str

date

The date the bounty was created.

Type

str

nation_id

The ID of the nation the bounty is on.

Type

str

nation

The nation the bounty is on.

Type

Nation

amount

The amount of the bounty reward.

Type

int

war_type

The type of war the bounty is for.

Type

str

to_dict()Dict[str, Any]

Get a dict representation of this data.

Returns

A dictionary of the data on the object.

Return type

Dict[str, Any]

City

class pnwkit.data.City(data: Mapping[str, Any])

Represents a city.

id

The city ID.

Type

str

nation_id

The ID of the nation the city belongs to.

Type

str

nation

The nation the city belongs to.

Type

Nation

name

The city name.

Type

str

date

The date the city was created.

Type

str

infrastructure

The amount of infrastructure in the city.

Type

float

land

The amount of land in the city.

Type

float

powered

Whether the city is powered or not.

Type

bool

oilpower

The amount of Oil Power Plants in the city.

Type

int

windpower

The amount of Wind Power Plants in the city.

Type

int

coalpower

The amount of Coal Power Plants in the city.

Type

int

nuclearpower

The amount of Nuclear Power Plants in the city.

Type

int

coalmine

The amount of Coal Mines in the city.

Type

int

oilwell

The amount of Oil Wells in the city.

Type

int

uramine

The amount of Uranium Mines in the city.

Type

int

barracks

The amount of Barracks in the city.

Type

int

farm

The amount of Farms in the city.

Type

int

policestation

The amount of Police Stations in the city.

Type

int

hospital

The amount of Hospitals in the city.

Type

int

recyclingcenter

The amount of Recycling Centers in the city.

Type

int

subway

The amount of Subways in the city.

Type

int

supermarket

The amount of Supermarkets in the city.

Type

int

bank

The amount of Banks in the city.

Type

int

mall

The amount of Shopping Malls in the city.

Type

int

stadium

The amount of Stadiums in the city.

Type

int

leadmine

The amount of Lead Mines in the city.

Type

int

ironmine

The amount of Iron Mines in the city.

Type

int

bauxitemine

The amount of Bauxite Mines in the city.

Type

int

gasrefinery

The amount of Oil Refineries in the city.

Type

int

aluminumrefinery

The amount of Aluminum Refineries in the city.

Type

int

steelmill

The amount of Steel Mill in the city.

Type

int

munitionsfactory

The amount of Munitions Factories in the city.

Type

int

factory

The amount of Factories in the city.

Type

int

airforcebase

The amount of Hangars in the city.

Type

int

drydock

The amount of Drydocks in the city.

Type

int

nukedate

The date the city was last nuked.

Type

str

to_dict()Dict[str, Any]

Get a dict representation of this data.

Returns

A dictionary of the data on the object.

Return type

Dict[str, Any]

Color

Methods
class pnwkit.data.Color(data: Mapping[str, Any])

Represents a color bloc.

color

The color.

Type

str

bloc_name

The color bloc name.

Type

str

turn_bonus

The color turn bonus.

Type

int

to_dict()Dict[str, Any]

Get a dict representation of this data.

Returns

A dictionary of the data on the object.

Return type

Dict[str, Any]

GameInfo

Attributes
Methods
class pnwkit.data.GameInfo(data: Mapping[str, Any])

Represents some game info.

game_date

The game date.

Type

str

radiation

The radiation index.

Type

Radiation

to_dict()Dict[str, Any]

Get a dict representation of this data.

Returns

A dictionary of the data on the object.

Return type

Dict[str, Any]

Nation

class pnwkit.data.Nation(data: Mapping[str, Any])

Represents a nation.

id

The nation ID.

Type

str

alliance_id

The nation’s alliance ID.

Type

str

alliance_position

The nation’s alliance position.

Type

str

alliance

The nation’s alliance.

Type

Alliance

nation_name

The nation name.

Type

str

leader_name

The nation’s leader name.

Type

str

continent

The nation’s continent.

Type

str

warpolicy

The nation’s war policy.

Type

str

dompolicy

The nation’s domestic policy.

Type

str

color

The nation’s color

Type

str

num_cities

The number of cities the nation has.

Type

int

cities

The nation’s cities.

Type

Tuple[City, …]

score

The nation’s score.

Type

float

update_tz

The nation’s update timezone. Will return None if the querying key cannot see the nation’s bank.

Type

float

population

The nation’s population.

Type

int

flag

The nation’s flag.

Type

str

vmode

The number of turns the nation has in Vacation Mode.

Type

int

beigeturns

The number of turns the nation has on Beige.

Type

int

espionage_available

Whether the nation has can be have an espionage operation executed on it or not.

Type

bool

last_active

When the nation was last active.

Type

str

date

When the nation was created.

Type

str

soldiers

The amount of soldiers the nation has.

Type

int

tanks

The amount of tanks the nation has.

Type

int

aircraft

The amount of aircraft the nation has.

Type

int

ships

The amount of ships the nation has.

Type

int

missiles

The amount of missiles the nation has.

Type

int

nukes

The amount of nukes the nation has.

Type

int

spies

The amount of spies the nation has. Will return None if the querying key cannot see the nation’s bank.

Type

int

discord

The nation’s discord username.

Type

str

treasures

The treasures a nation has.

Type

Tuple[Treasure, …]

wars

The wars the nation is involved in.

Type

Tuple[War, …]

bankrecs

The received bank records of the nation.

Type

Tuple[Bankrec, …]

taxrecs

The nation’s tax records. Will return None if the querying key cannot see the nation’s bank.

Type

Optional[Tuple[Bankrec, …]]

bounties

The bounties on the nation.

Type

Tuple[Bounty, …]

turns_since_last_city

The number of turns since the nation has built a city.

Type

int

turns_since_last_project

The number of turns since the nation has built a project.

Type

int

money

The amount of money the nation has. Will return None if the querying key cannot see the nation’s bank.

Type

Optional[float]

coal

The amount of coal the nation has. Will return None if the querying key cannot see the nation’s bank.

Type

Optional[float]

oil

The amount of oil the nation has. Will return None if the querying key cannot see the nation’s bank.

Type

Optional[float]

uranium

The amount of uranium the nation has. Will return None if the querying key cannot see the nation’s bank.

Type

Optional[float]

iron

The amount of iron the nation has. Will return None if the querying key cannot see the nation’s bank.

Type

Optional[float]

bauxite

The amount of bauxite the nation has. Will return None if the querying key cannot see the nation’s bank.

Type

Optional[float]

lead

The amount of lead the nation has. Will return None if the querying key cannot see the nation’s bank.

Type

Optional[float]

gasoline

The amount of gasoline the nation has. Will return None if the querying key cannot see the nation’s bank.

Type

Optional[float]

munitions

The amount of munitions the nation has. Will return None if the querying key cannot see the nation’s bank.

Type

Optional[float]

steel

The amount of steel the nation has. Will return None if the querying key cannot see the nation’s bank.

Type

Optional[float]

aluminum

The amount of aluminum the nation has. Will return None if the querying key cannot see the nation’s bank.

Type

Optional[float]

food

The amount of food the nation has. Will return None if the querying key cannot see the nation’s bank.

Type

Optional[float]

projects

The number of projects the nation has.

Type

int

project_bits

The bitwise representation of the nation’s projects.

Type

int

ironw

Whether the nation has the Ironworks project or not.

Type

bool

bauxitew

Whether the nation has the Bauxiteworks project or not.

Type

bool

armss

Whether the nation has the Arms Stockpile project or not.

Type

bool

egr

Whether the nation has the Emergency Gasoline Reserve project or not.

Type

bool

massirr

Whether the nation has the Mass Irrigation project or not.

Type

bool

itc

Whether the nation has the International Trade Center project or not.

Type

bool

mlp

Whether the nation has the Missile Launch Pad project or not.

Type

bool

nrf

Whether the nation has the Nuclear Research Facility project or not.

Type

bool

irond

Whether the nation has the Iron Dome project or not.

Type

bool

vds

Whether the nation has the Vital Defense System project or not.

Type

bool

cia

Whether the nation has the Intelligence Agency project or not.

Type

bool

cfce

Whether the nation has the Center for Civil Engineering project or not.

Type

bool

propb

Whether the nation has the Propaganda Bureau project or not.

Type

bool

uap

Whether the nation has the Uranium Enrichment Program project or not.

Type

bool

city_planning

Whether the nation has the Urban Planning project or not.

Type

bool

adv_city_planning

Whether the nation has the Advanced Urban Planning project or not.

Type

bool

space_program

Whether the nation has the Space Program project or not.

Type

bool

spy_satellite

Whether the nation has the Spy Satellite project or not.

Type

bool

moon_landing

Whether the nation has the Moon Landing project or not.

Type

bool

pirate_economy

Whether the nation has the Pirate Economy project or not.

Type

bool

recycling_initiative

Whether the nation has the Recycling Initiative project or not.

Type

bool

telecom_satellite

Whether the nation has the Telecommunication Satellite project or not.

Type

bool

green_tech

Whether the nation has the Green Technologies project or not.

Type

bool

arable_land_agency

Whether the nation has the Arable Land Agency project or not.

Type

bool

clinical_research_center

Whether the nation has the Clinical Research Center project or not.

Type

bool

specialized_police_training

Whether the nation has the Specialized Police Training Program project or not.

Type

bool

adv_engineering_corps

Whether the nation has the Advanced Engineering Corps project or not.

Type

bool

wars_won

The number of wars the nation has won.

Type

int

wars_lost

The number of wars the nation has lost.

Type

int

tax_id

The nation’s tax bracket ID.

Type

str

alliance_seniority

The nation’s alliance seniority.

Type

int

to_dict()Dict[str, Any]

Get a dict representation of this data.

Returns

A dictionary of the data on the object.

Return type

Dict[str, Any]

Radiation

class pnwkit.data.Radiation(data: Mapping[str, Any])

Represents the radiation index.

global_

The global radiation index.

Type

float

north_america

The North America radiation index.

Type

float

south_america

The South America radiation index.

Type

float

europe

The Europe radiation index.

Type

float

africa

The Africa radiation index.

Type

float

asia

The Asia radiation index.

Type

float

australia

The Australia radiation index.

Type

float

antarctica

The Antarctica radiation index.

Type

float

to_dict()Dict[str, Any]

Get a dict representation of this data.

Returns

A dictionary of the data on the object.

Return type

Dict[str, Any]

TaxBracket

class pnwkit.data.TaxBracket(data: Mapping[str, Any])

Represents a tax bracket.

id

The tax bracket ID.

Type

str

alliance_id

The tax bracket’s alliance ID.

Type

str

alliance

The tax bracket’s alliance.

Type

Alliance

date

The date the tax bracket was created.

Type

str

date_modified

The date the tax bracket was last modified.

Type

str

last_modifier_id

The ID of the last modifier of the tax bracket.

Type

str

last_modifier

The last modifier of the tax bracket.

Type

Nation

to_dict()Dict[str, Any]

Get a dict representation of this data.

Returns

A dictionary of the data on the object.

Return type

Dict[str, Any]

Trade

class pnwkit.data.Trade(data: Mapping[str, Any])

Represents a trade

id

The trade ID.

Type

str

date

The date the trade took place.

Type

str

sid

The sender ID.

Type

str

rid

The receiver ID.

Type

str

sender

The sender’s nation.

Type

Nation

receiver

The receiver’s nation.

Type

Nation

offer_resource

The resource being offered.

Type

str

offer_amount

The amount being offered.

Type

int

buy_or_sell

Whether the offer was a buy or sell offer.

Type

str

total

The price per unit of the offer.

Type

int

accepted

Whether or not the offer has been accepted.

Type

bool

date_accepted

The date the offer was accepted.

Type

str

to_dict()Dict[str, Any]

Get a dict representation of this data.

Returns

A dictionary of the data on the object.

Return type

Dict[str, Any]

Tradeprice

class pnwkit.data.Tradeprice(data: Mapping[str, Any])

Represents a tradeprice.

id

The tradeprice ID.

Type

str

date

The date of the tradeprice.

Type

str

coal

The price of coal.

Type

float

oil

The price of oil.

Type

float

uranium

The price of uranium.

Type

float

iron

The price of iron.

Type

float

bauxite

The price of bauxite.

Type

float

lead

The price of lead.

Type

float

gasoline

The price of gasoline.

Type

float

munitions

The price of munitions.

Type

float

steel

The price of steel.

Type

float

aluminum

The price of aluminum.

Type

float

food

The price of food.

Type

float

credits

The price of credits.

Type

float

to_dict()Dict[str, Any]

Get a dict representation of this data.

Returns

A dictionary of the data on the object.

Return type

Dict[str, Any]

Treasure

class pnwkit.data.Treasure(data: Mapping[str, Any])

Represents a treasure.

name

The name of the treasure.

Type

str

color

The treasure’s color.

Type

str

continent

The treasure’s continent.

Type

str

bonus

The treasure’s bonus.

Type

int

spawndate

The treasure’s spawndate.

Type

str

nation

The nation that has the treasure.

Type

Nation

to_dict()Dict[str, Any]

Get a dict representation of this data.

Returns

A dictionary of the data on the object.

Return type

Dict[str, Any]

Treaty

class pnwkit.data.Treaty(data: Mapping[str, Any])

Represents a treaty.

id

The treaty ID.

Type

str

date

The date and time the treaty was created.

Type

str

treaty_type

The type of treaty.

Type

str

turns_left

The number of turns left in the treaty.

Type

int

alliance1_id

The ID of the alliance who sent the treaty.

Type

str

alliance1

The alliance who sent the treaty.

Type

Alliance

alliance2_id

The ID of the alliance who received the treaty.

Type

str

alliance2

The alliance who received the treaty.

Type

Alliance

to_dict()Dict[str, Any]

Get a dict representation of this data.

Returns

A dictionary of the data on the object.

Return type

Dict[str, Any]

War

class pnwkit.data.War(data: Mapping[str, Any])

Represents a war.

id

The war ID.

Type

str

date

The date the war was declared.

Type

str

reason

The war reason.

Type

str

war_type

The war type.

Type

str

groundcontrol

The ID of the nation that has Ground Control.

Type

str

airsuperiority

The ID of the nation that has Air Superiority.

Type

str

navalblockade

The ID of the nation that has a Naval Blockade.

Type

str

winner

The ID of the winner of the war.

Type

str

attacks

The attacks in the war.

Type

Tuple[WarAttack, …]

turnsleft

The turns left in the war.

Type

int

attid

The attacker ID.

Type

str

att_alliance_id

The attacker’s alliance ID.

Type

str

attacker

The attacker’s nation.

Type

Nation

defid

The defender’s ID.

Type

str

def_alliance_id

The defender’s alliance ID.

Type

str

defender

The defender’s nation.

Type

Nation

attpoints

The attacker’s Military Action Points.

Type

int

defpoints

The defender’s Military Action Points.

Type

int

attpeace

Whether the attacker has offered peace or not.

Type

bool

defpeace

Whether the defender has offered peace or not.

Type

bool

att_resistance

The attacker’s resistance.

Type

int

def_resistance

The defender’s resistance.

Type

int

att_fortify

Whether the attacker has fortified or not.

Type

bool

def_fortify

Whether the defender has fortified or not.

Type

bool

att_gas_used

The amount of gasoline used by the attacker.

Type

float

def_gas_used

The amount of gasoline used by the defender.

Type

float

att_mun_used

The amount of munitions used by the attacker.

Type

float

def_mun_used

The amount of munitions used by the defender.

Type

float

att_alum_used

The amount of aluminum used by the attacker.

Type

int

def_alum_used

The amount of aluminum used by the defender.

Type

int

att_steel_used

The amount of steel used by the attacker.

Type

int

def_steel_used

The amount of steel used by the defender.

Type

int

att_infra_destroyed

The amount of infrastructure destroyed by the attacker.

Type

float

def_infra_destroyed

The amount of infrastructure destroyed by the defender.

Type

float

att_money_looted

The amount of money looted by the attacker.

Type

float

def_money_looted

The amount of money looted by the attacker.

Type

float

att_soldiers_killed

The amount of soldiers killed by the attacker.

Type

int

def_soldiers_killed

The amount of soldiers killed by the defender.

Type

int

att_tanks_killed

The amount of tanks killed by the attacker.

Type

int

def_tanks_killed

The amount of tanks killed by the defender.

Type

int

att_aircraft_killed

The amount of aircraft killed by the attacker.

Type

int

def_aircraft_killed

The amount of aircraft killed by the defender.

Type

int

att_ships_killed

The amount of ships killed by the attacker.

Type

int

def_ships_killed

The amount of ships killed by the defender.

Type

int

att_missiles_used

The amount of missiles used by the attacker.

Type

int

def_missiles_used

The amount of missiles killed by the defender.

Type

int

att_nukes_used

The amount of nukes used by the attacker.

Type

int

def_nukes_used

The amount of nukes killed by the defender.

Type

int

att_infra_destroyed_value

The value of infrastructure destroyed by the attacker.

Type

float

def_infra_destroyed_value

The value of infrastructure destroyed by the defender.

Type

float

to_dict()Dict[str, Any]

Get a dict representation of this data.

Returns

A dictionary of the data on the object.

Return type

Dict[str, Any]

WarAttack

class pnwkit.data.WarAttack(data: Mapping[str, Any])

Represents a war attack.

id

The attack ID.

Type

str

date

The date the attack took place.

Type

str

attid

The attacking nation ID.

Type

str

attacker

The attacking nation.

Type

Nation

defid

The defending nation ID.

Type

str

defender

The defending nation.

Type

Nation

type

The attack type.

Type

str

warid

The war ID.

Type

str

war

The war.

Type

War

victor

The victor of the attack.

Type

str

success

The attack’s level of success.

Type

int

attcas1

A special value depending on the attack.

Type

int

defcas1

A special value depending on the attack.

Type

int

attcas2

A special value depending on the attack.

Type

int

defcas2

A special value depending on the attack.

Type

int

cityid

The ID of the city that was attacked.

Type

str

infradestroyed

The amount of infrastructure destroyed.

Type

float

improvementslost

The amount of improvements destroyed.

Type

int

moneystolen

The amount of money stolen.

Type

float

loot_info

The loot info of the attack.

Type

str

resistance_eliminated

The amount of resistance eliminated.

Type

int

city_infra_before

The city’s infrastructure before the attack

Type

float

infra_destroyed_value

The value of infrastructure destroyed.

Type

float

att_mun_used

The amount of munitions used by the attacker.

Type

float

def_mun_used

The amount of munitions used by the defender.

Type

float

att_gas_used

The amount of gasoline used by the attacker.

Type

float

def_gas_used

The amount of gasoline used by the defender.

Type

float

aircraft_killed_by+tanks

The amount of aircraft killed by tanks.

Type

int

to_dict()Dict[str, Any]

Get a dict representation of this data.

Returns

A dictionary of the data on the object.

Return type

Dict[str, Any]

PaginatorInfo

class pnwkit.data.PaginatorInfo(data: Mapping[str, Any])

Represents paginator info

count

Count of items available on the page.

Type

int

currentPage

The current page number.

Type

int

firstItem

The index of the first item on the page.

Type

int

hasMorePages

Whether there are more pages or not.

Type

bool

lastItem

The index of the last item on the page.

Type

int

lastPage

The page number of the last page.

Type

int

perPage

The number of items per page.

Type

int

total

The total number of items.

Type

int

to_dict()Dict[str, Any]

Get a dict representation of this data.

Returns

A dictionary of the data on the object.

Return type

Dict[str, Any]