Skip to content

Commit

Permalink
webapi: minor tweaks in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mjl- committed Aug 23, 2024
1 parent 6c488ea commit a485df8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions webapi/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The webapi has a base URL at /webapi/v0/ by default, but configurable, which
serves an introduction that points to this documentation and lists the API
methods available.
An HTTP POST to /webapi/v0/<method> calls a method.The form can be either
An HTTP POST to /webapi/v0/<method> calls a method. The form can be either
"application/x-www-form-urlencoded" or "multipart/form-data". Form field
"request" must contain the request parameters, encoded as JSON.
Expand All @@ -42,7 +42,7 @@ errors). Most successful calls return a JSON object, but some return data
(e.g. a raw message or an attachment of a message). See [Methods] for the
methods and and [Client] for their documentation. The first element of their
return values indicate their JSON object type or io.ReadCloser for non-JSON
data. The request and response types are converted from/to JSON. optional and
data. The request and response types are converted from/to JSON. Optional and
missing/empty fields/values are converted into Go zero values: zero for
numbers, empty strings, empty lists and empty objects. New fields may be added
in response objects in future versions, parsers should ignore unrecognized
Expand Down Expand Up @@ -90,7 +90,7 @@ that spammy behaviour and blocklist your mail server.
Automatic suppression list management already prevents most repeated sending
attempts. The webhooks make it easy to receive failure notifications.
To keep spam complaints about your messages a minimum, include links to
To keep spam complaints about your messages to a minimum, include links to
unsubscribe from future messages without requiring further actions from the
user, such as logins. Include an unsubscribe link in the footer, and include
List-* message headers, such as List-Id, List-Unsubscribe and
Expand Down Expand Up @@ -262,7 +262,7 @@ Get a raw, unparsed message, as bytes:
$ curl --user mox@localhost:moxmoxmox --data request='{"MsgID": 123}' http://localhost:1080/webapi/v0/MessageRawGet
[message as bytes in raw form]
Mark a message as read:
Mark a message as read and set flag "custom":
$ curl --user mox@localhost:moxmoxmox --data request='{"MsgID": 424, "Flags": ["\\Seen", "custom"]}' http://localhost:1080/webapi/v0/MessageFlagsAdd
{}
Expand Down
8 changes: 4 additions & 4 deletions webapi/gendoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ The webapi has a base URL at /webapi/v0/ by default, but configurable, which
serves an introduction that points to this documentation and lists the API
methods available.
An HTTP POST to /webapi/v0/<method> calls a method.The form can be either
An HTTP POST to /webapi/v0/<method> calls a method. The form can be either
"application/x-www-form-urlencoded" or "multipart/form-data". Form field
"request" must contain the request parameters, encoded as JSON.
Expand All @@ -52,7 +52,7 @@ errors). Most successful calls return a JSON object, but some return data
(e.g. a raw message or an attachment of a message). See [Methods] for the
methods and and [Client] for their documentation. The first element of their
return values indicate their JSON object type or io.ReadCloser for non-JSON
data. The request and response types are converted from/to JSON. optional and
data. The request and response types are converted from/to JSON. Optional and
missing/empty fields/values are converted into Go zero values: zero for
numbers, empty strings, empty lists and empty objects. New fields may be added
in response objects in future versions, parsers should ignore unrecognized
Expand Down Expand Up @@ -100,7 +100,7 @@ that spammy behaviour and blocklist your mail server.
Automatic suppression list management already prevents most repeated sending
attempts. The webhooks make it easy to receive failure notifications.
To keep spam complaints about your messages a minimum, include links to
To keep spam complaints about your messages to a minimum, include links to
unsubscribe from future messages without requiring further actions from the
user, such as logins. Include an unsubscribe link in the footer, and include
List-* message headers, such as List-Id, List-Unsubscribe and
Expand Down Expand Up @@ -273,7 +273,7 @@ Get a raw, unparsed message, as bytes:
\$ curl --user mox@localhost:moxmoxmox --data request='{"MsgID": 123}' http://localhost:1080/webapi/v0/MessageRawGet
[message as bytes in raw form]
Mark a message as read:
Mark a message as read and set flag "custom":
\$ curl --user mox@localhost:moxmoxmox --data request='{"MsgID": 424, "Flags": ["\\\\Seen", "custom"]}' http://localhost:1080/webapi/v0/MessageFlagsAdd
{}
Expand Down

0 comments on commit a485df8

Please sign in to comment.