Files

69 lines
1.1 KiB
Python

import os
name = "Set availability"
kind = "action"
id = "setavailable"
showstatus = True
resolve = {
"get": {
"availabletime": ["availabletime"],
},
}
availabletime = int(os.environ.get("AVAILABLE_DURATION",3))
duration = availabletime - 1
keys = [
{
"keytitle": "option",
"keyvalue": 1,
},
{
"keytitle": "duration",
"keyvalue": duration,
},
]
method = "PUT"
path = "https://rentmasseur.com/api/v1/account/dashboard/availability"
headers = {
"Authorization": {
"output": "access_token",
"prefix": "Bearer ",
},
}
outputs = {
"available_until": "validTo"
}
prints = {
"Available until": "available_until"
}
recoverPolicy = {
KeyError:[False],
TypeError: [],
}
#filters = [
# {
# "filterkey": "availabletime",
# "operator": ">=",
# "filtervalue": 3600,
# "print": "Availabile time above threshold. Skipping Set Available...",
# },
#]
loaddata = [
"access_token",
#"refresh_token",
]
savepath = os.environ["TOKEN_STORE"]