Update api.md docs (#148)
* Update player entry format in API documentation * Add spam flag
This commit is contained in:
parent
a347a79e6a
commit
5cfec3a92a
17
api.md
17
api.md
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
# Mail format
|
# Mail format
|
||||||
The mail format in the api hooks
|
The mail format in the api hooks
|
||||||
|
|
||||||
@ -70,6 +69,7 @@ The recipient handler should return
|
|||||||
mod-storage entry for a player (indexed by playername and serialized with json):
|
mod-storage entry for a player (indexed by playername and serialized with json):
|
||||||
```lua
|
```lua
|
||||||
{
|
{
|
||||||
|
|
||||||
contacts = {
|
contacts = {
|
||||||
{
|
{
|
||||||
-- name of the player (unique key in the list)
|
-- name of the player (unique key in the list)
|
||||||
@ -99,7 +99,9 @@ mod-storage entry for a player (indexed by playername and serialized with json):
|
|||||||
-- timestamp (os.time())
|
-- timestamp (os.time())
|
||||||
time = 1234,
|
time = 1234,
|
||||||
-- read-flag (true: player has read the mail, inbox only)
|
-- read-flag (true: player has read the mail, inbox only)
|
||||||
read = true
|
read = true,
|
||||||
|
-- spam-flag (true: that mail is noted as a spam)
|
||||||
|
spam = false
|
||||||
},{
|
},{
|
||||||
...
|
...
|
||||||
}
|
}
|
||||||
@ -107,6 +109,12 @@ mod-storage entry for a player (indexed by playername and serialized with json):
|
|||||||
outbox = {
|
outbox = {
|
||||||
-- same format as "inbox"
|
-- same format as "inbox"
|
||||||
},
|
},
|
||||||
|
drafts = {
|
||||||
|
-- same format as "inbox"
|
||||||
|
},
|
||||||
|
trash = {
|
||||||
|
-- same format as "inbox"
|
||||||
|
},
|
||||||
lists = {
|
lists = {
|
||||||
{
|
{
|
||||||
-- name of the maillist (unique key in the list)
|
-- name of the maillist (unique key in the list)
|
||||||
@ -116,5 +124,10 @@ mod-storage entry for a player (indexed by playername and serialized with json):
|
|||||||
-- playername list
|
-- playername list
|
||||||
players = {"playername", "playername2"}
|
players = {"playername", "playername2"}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
settings = {
|
||||||
|
setting1 = "value",
|
||||||
|
setting2 = true,
|
||||||
|
setting3 = 123
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user