This is pseudocode.
post
has been retrieved from the API.
Be sure to make substrings and other string operations by "multibyte" divisions.
"owner":{}, | |
"acl": { | |
"full": { | |
"immutable": true, | |
"user_ids": [1,2,4], | |
"you": false | |
}, | |
"write": { | |
"immutable": false, | |
"user_ids": [8,"@user"], |
Channel | |
{ | |
"type":"vidcast", | |
"owner":{}, | |
"acl":{ | |
"full":{"user_ids":[]}, | |
"write":{"any_user"} | |
}, | |
"raw":[ | |
{ |
# Author: @33MHz | |
# 2017-03-04 hackday | |
# Polls, printing to USB receipt printer | |
from pnutpy import api | |
import subprocess | |
from shlex import quote | |
api.add_authorization_token('TOKEN HERE') |
curl "https://api.pnut.io/v0/polls" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "Content-Type: application/json" \
-d "{
\"type\":\"general.poll\",
\"prompt\":\"What is Pnut to you?\",
\"options\":[
{
\"text\":\"My jam\"
I believe all but canonical_url
would be optional. But if including source
, both url
and name
would be required. If including user
, id
would be required.
{
"type": "io.pnut.core.crosspost",
"value": {
"canonical_url": "https://some-matrix-service.org/howeverthisgoes/123",
"user": {
"id": "@alice:example.com",
"username": "alice",
#!/bin/bash | |
# GPIO Colors | |
# 435 = 1 green | |
# 436 = 1 yellow | |
# 437 = 2 green | |
# 438 = 2 yellow | |
# USAGE: led.sh [LED ID] [STATE] | |
# Example: sudo ./led.sh 1 yellow |
v0.9.6 will continue to be supported as-is until further notice except that user streams and app streams are no longer supported for v0.9.6. Streams will only work on v1 going forward.
All items below affect v1.0.0, and most do not affect v0.9.6. If it also affects v0.9.6, it will be marked with v0.9.6+.
recent_deleted_message
{ | |
"text": "String", | |
"raw": { | |
"st.longpo.broadcast": [ | |
{ | |
"longpost_id": "Channel ID" | |
} | |
] | |
} | |
} |