Use the Blinko API from Python with host and token loaded from OS environment variables.
Set environment variables in your OS/session:
BLINKO_HOST=http://127.0.0.1:1111/api
BLINKO_TOKEN=your_token_here
python3 {baseDir}/scripts/blinko_client.py list-notes
python3 {baseDir}/scripts/blinko_client.py get-note NOTE_ID
python3 {baseDir}/scripts/blinko_client.py upsert-note --content "My note content"
python3 {baseDir}/scripts/blinko_client.py delete-note NOTE_ID
python3 {baseDir}/scripts/blinko_client.py list-blinkos
python3 {baseDir}/scripts/blinko_client.py upsert-blinko --content "Quick thought"
python3 {baseDir}/scripts/blinko_client.py promote-blinko BLINKO_ID
BLINKO_HOST and BLINKO_TOKEN from the OS environment.
BLINKO_HOST is missing, defaults to http://127.0.0.1:1111.
/v1/note/...) for both notes and blinkos.
共 1 个版本