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:
2025-10-08 09:14:45 +00:00
parent 7251e90395
commit b3f08fb64c
11 changed files with 24 additions and 244 deletions

View File

@@ -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',