53 lines
869 B
Python
53 lines
869 B
Python
import os
|
|
|
|
name = "Synapse Message Push"
|
|
|
|
kind = "action"
|
|
|
|
showstatus = True
|
|
|
|
astoken = os.environ["AS_TOKEN"]
|
|
|
|
resolve = {
|
|
"sender": ["message", "senderId"],
|
|
#"messageid": ["message", "id"],
|
|
"username": ["profile", "username"],
|
|
"location": ["profile", "location"],
|
|
}
|
|
keys = [
|
|
{
|
|
"keytitle": "type",
|
|
"keyvalue": ,
|
|
},
|
|
{
|
|
"keytitle": "username",
|
|
"keyvalue": {outputs: senderId},
|
|
},
|
|
{
|
|
"keytitle": "csrf",
|
|
"keyvalue": {
|
|
"outputs": "csrf_token",
|
|
},
|
|
},
|
|
{
|
|
"keytitle": "remember",
|
|
"keyvalue": 1,
|
|
},
|
|
]
|
|
|
|
method = "POST"
|
|
|
|
path = "https://rentmasseur.com/api/v1/login"
|
|
|
|
outputs = {
|
|
"access_token": "accessToken",
|
|
"refresh_token": "refreshToken",
|
|
}
|
|
|
|
savedata = [
|
|
"access_token",
|
|
"refresh_token",
|
|
]
|
|
|
|
savepath = os.environ["TOKEN_STORE"]
|