#NOTE: This is for python applications import requests, json nationID = "nationID you want data on" apikey = "Your PNW api key (found on the account page)" nationreq = requests.get(f"https://politicsandwar.com/api/nation/id={nationID}&key={apikey}") nationreq = nationreq.json() print(nationreq) cityids = nationreq["cityids"] nationid = nationreq["nationid"] nation_name = nationreq["name"] nation_prename = nationreq["prename"] uniqueid = nationreq["uniqueid"] print(f"{cityids} {nationid} {nation_name} {nation_prename} {uniqueid}")
Read more of this post
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.