- API, Mac client
This commit is contained in:
@@ -42,6 +42,31 @@ php cli/blog.php delete old-slug
|
||||
php cli/blog.php rebuild
|
||||
```
|
||||
|
||||
## Mac Client and API
|
||||
|
||||
The native macOS 12+ client lives in `macclient/`.
|
||||
|
||||
```bash
|
||||
cd macclient
|
||||
swift run TCMSMacClient
|
||||
```
|
||||
|
||||
Point the client at any TCMS site URL. It will call `api.php` at that site for posts, pages, media, comments, local autosave restore, and optional remote draft autosave.
|
||||
|
||||
For remote servers, set an API token in `config/site.json` or through the `TCMS_API_TOKEN` environment variable:
|
||||
|
||||
```json
|
||||
{
|
||||
"api": {
|
||||
"enabled": true,
|
||||
"token": "replace-with-a-long-random-token",
|
||||
"allow_local_without_token": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Send the token as a Bearer token or `X-TCMS-Token`. Localhost requests may use the tokenless development fallback while `allow_local_without_token` is enabled.
|
||||
|
||||
## Comments
|
||||
|
||||
Comments are moderated by default and protected by captcha plus a honeypot field.
|
||||
|
||||
Reference in New Issue
Block a user