BREAKING CHANGE(classes.ghost): Remove Settings and Webhooks browse/read APIs, remove noisy console.error logs, and update tests/docs
This commit is contained in:
33
readme.md
33
readme.md
@@ -404,42 +404,11 @@ await newMember.update({
|
||||
await newMember.delete();
|
||||
```
|
||||
|
||||
#### Site Settings
|
||||
|
||||
Read and update Ghost site settings.
|
||||
|
||||
```typescript
|
||||
// Get all settings
|
||||
const settings = await ghostInstance.getSettings();
|
||||
console.log(settings);
|
||||
|
||||
// Update settings
|
||||
await ghostInstance.updateSettings([
|
||||
{
|
||||
key: 'title',
|
||||
value: 'My Updated Site Title'
|
||||
},
|
||||
{
|
||||
key: 'description',
|
||||
value: 'My site description'
|
||||
}
|
||||
]);
|
||||
```
|
||||
|
||||
#### Webhooks Management
|
||||
|
||||
Manage webhooks for Ghost events.
|
||||
Manage webhooks for Ghost events. Note: The Ghost Admin API only supports creating, updating, and deleting webhooks (browsing and reading individual webhooks are not supported by the underlying SDK).
|
||||
|
||||
```typescript
|
||||
// Get all webhooks
|
||||
const webhooks = await ghostInstance.getWebhooks();
|
||||
webhooks.forEach(webhook => {
|
||||
console.log(`${webhook.name}: ${webhook.target_url}`);
|
||||
});
|
||||
|
||||
// Get webhook by ID
|
||||
const webhook = await ghostInstance.getWebhookById('webhook-id');
|
||||
|
||||
// Create a webhook
|
||||
const newWebhook = await ghostInstance.createWebhook({
|
||||
event: 'post.published',
|
||||
|
Reference in New Issue
Block a user