Contact me to be added to this repository. Push the creations you make for D&D, and they will be displayed in a nice website. See the website for how to contribute.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

34 lines
696 B

from requests import post
SRVR = 'http://localhost:5000'
def runTest():
cmbt ={
"ents": [
{
"name" : "dude 1",
"hp" : "20",
"init" : "1"
},
{
"name" : "dude 2",
"hp" : "16",
"init" : "2"
}
]
}
resp = post(SRVR+'/test',json=cmbt)
if resp.ok:
print(resp.content)
else:
print("oh no")
def startCombatSession():
resp = post(SRVR+'/cli/begin_combat',json={})
if resp.ok:
print("Combat id is " + str(resp.content))
else:
print("Could not start combat")
if __name__ == "__main__":
runTest()