initial icfprequests module
parent
864109b858
commit
e4941a7453
@ -0,0 +1,29 @@
|
|||||||
|
import requests
|
||||||
|
import json
|
||||||
|
|
||||||
|
endpointUrl = "https://31pwr5t6ij.execute-api.eu-west-2.amazonaws.com/"
|
||||||
|
selectUrl = endpointUrl + "select"
|
||||||
|
exploreUrl = endpointUrl + "explore"
|
||||||
|
guessUrl = endpointUrl + "guess"
|
||||||
|
|
||||||
|
id = "icfp@zeuxis.de DHf1KQyE3vCvMqPaA4LLlw"
|
||||||
|
|
||||||
|
def select( id, problem):
|
||||||
|
selectJson = {
|
||||||
|
"id": id,
|
||||||
|
"problemName": problem
|
||||||
|
}
|
||||||
|
response = requests.post(selectUrl, json=json.dumps(selectJson))
|
||||||
|
return response.json()
|
||||||
|
|
||||||
|
def explore( id, plans):
|
||||||
|
exploreJson = {
|
||||||
|
"id": id,
|
||||||
|
"plans": plans
|
||||||
|
}
|
||||||
|
response = requests.post(exploreUrl, json=json.dumps(exploreJson))
|
||||||
|
return response.json()
|
||||||
|
|
||||||
|
|
||||||
|
def guess( id, rooms, startingroom, connections ):
|
||||||
|
pass
|
||||||
Loading…
Reference in New Issue