Skip to content

Commit

Permalink
Update api.md docs (#148)
Browse files Browse the repository at this point in the history
* Update player entry format in API documentation

* Add spam flag
  • Loading branch information
Athozus authored Aug 5, 2024
1 parent a347a79 commit 5cfec3a
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions api.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Mail format
The mail format in the api hooks

Expand Down Expand Up @@ -70,6 +69,7 @@ The recipient handler should return
mod-storage entry for a player (indexed by playername and serialized with json):
```lua
{

contacts = {
{
-- name of the player (unique key in the list)
Expand Down Expand Up @@ -99,14 +99,22 @@ mod-storage entry for a player (indexed by playername and serialized with json):
-- timestamp (os.time())
time = 1234,
-- 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
},{
...
}
},
outbox = {
-- same format as "inbox"
},
drafts = {
-- same format as "inbox"
},
trash = {
-- same format as "inbox"
},
lists = {
{
-- name of the maillist (unique key in the list)
Expand All @@ -116,5 +124,10 @@ mod-storage entry for a player (indexed by playername and serialized with json):
-- playername list
players = {"playername", "playername2"}
}
},
settings = {
setting1 = "value",
setting2 = true,
setting3 = 123
}
}

0 comments on commit 5cfec3a

Please sign in to comment.