@iflow-mcp/claudeus-wp-mcp
Version:
The most comprehensive WordPress MCP server - 145 production-ready tools for complete WordPress management with AI
35 lines • 1.21 kB
JavaScript
import { BaseApiClient } from './base-client.js';
export class PostsApiClient extends BaseApiClient {
async getPosts(filters) {
return this.getPaginated('/posts', filters);
}
async createPost(data) {
return this.post('/posts', data);
}
async updatePost(id, data) {
return this.put(`/posts/${id}`, data);
}
async deletePost(id) {
return this.delete(`/posts/${id}`);
}
async getPostRevisions(id) {
return this.getPaginated(`/posts/${id}/revisions`);
}
async getPostRevision(postId, revisionId) {
return this.get(`/posts/${postId}/revisions/${revisionId}`);
}
async deletePostRevision(postId, revisionId) {
// Revisions require force=true (they don't support trash)
return this.delete(`/posts/${postId}/revisions/${revisionId}?force=true`);
}
async getPostAutosaves(id) {
return this.get(`/posts/${id}/autosaves`);
}
async getPostAutosave(postId, autosaveId) {
return this.get(`/posts/${postId}/autosaves/${autosaveId}`);
}
async createPostAutosave(id, data) {
return this.post(`/posts/${id}/autosaves`, data);
}
}
//# sourceMappingURL=posts.js.map