This repository has been archived by the owner on Jun 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
JSON: usernotes
Enigma edited this page Aug 13, 2015
·
10 revisions
Usernotes are stored in /r/subreddit/wiki/usernotes
- Any implementation where this page is created or modified should include setting the page to be visible for moderators only.
- Any implementation should check for the schema version used and never write an older schema than indicated in the json.
- Usernotes as of version schema 6 also make use of zlib to increase the amount of notes that can be stored.
Current schema version is 6. Supported read-only schema versions are 4-5.
{
"ver":6,
"constants": {
"users": [
"creesch", "TheEnigmaBlade"
],
"warnings": [
"none"
]
},
"blob":"eJyrVkouSk0tTs5QsqpWyitWsooGUkpWSiEZmcUKQJSokJdfkqqko1SiZGVoYmxpZGhuZmmqo5SrZGWgo5QDVJmjY2SQZp6ZA1RTDhSsja2tBQA4HBgB"
}
{
"TheEnigmaBlade": {
"ns": [
{
"n": "The coolest toolbox dev",
"t": 1430842947,
"m": 0,
"l": "l,2oaecb",
"w": 0
}
]
},
"agentlame": {
"ns": [
{
"n": "The lamest toolbox dev",
"t": 1430856730,
"m": 1,
"l": "l,25kvck",
"w": 0
}
]
}
}
-
ver
: The schema version used -
constants
: For storing mod names and note types-
users
: An array of mod username constants -
warnings
: An array of note type constants
-
-
blob
: A base64-encoded and zlib-compressed json object containing note data
The blob
is decompressed into the data
object used in schema 5, which is the format used internally by toolbox (see the source code for more information). This object contains a set of notes objects associated with noted users' names.
-
ns
: A list of note objects on a user, short for "notes"
-
n
: The note text, short for "note" -
l
: The thing information to which the note links, short for "link" -
t
: The time the note was made in seconds (schema 4 uses milliseconds), short for "time" -
m
: An index from theusers
constants array, short for "mod" -
w
: An index from thewarnings
constants array, short for "warning" ("type" used internally)
Thing information (l
) has three possible formats depending on thing type:
- Post:
l,POST_ID
- Comment:
l,POST_ID,COMMENT_ID
- Modmail:
m,MESSAGE_ID