This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euxo pipefail | |
cd "$(dirname "$0")" | |
./zip.sh .venv/function.zip | |
aws lambda update-function-code --function-name flowbackToMisskeyUser --zip-file fileb://.venv/function.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import os | |
import time | |
from misskey import Misskey | |
from misskey.exceptions import MisskeyAPIException | |
def lambda_handler(event, context): | |
print(json.dumps(event)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from misskey import Misskey | |
def post(body: dict): | |
print("post") | |
print(json.dumps(body)) | |
note = body['body']['note'] | |
user = body['body']['note']['user'] |