Modules@robinpath/wordpress

@robinpath/wordpress

0.1.0Public

WordPress module for RobinPath.

@robinpath/wordpress

WordPress module for RobinPath.

Category Functions Auth License

Why use this module?

The wordpress module lets you:

  • List posts with optional filters.
  • Get a single post by ID.
  • Create a new post.
  • Update an existing post.
  • Delete a post (trash or force-delete).

All functions are callable directly from RobinPath scripts with a simple, consistent API.

Installation

npm install @robinpath/wordpress

Quick Start

1. Set up credentials

wordpress.setCredentials "https://mysite.com" "admin" "xxxx xxxx xxxx xxxx"

2. List posts with optional filters.

wordpress.listPosts {"per_page":5,"status":"publish"}

Available Functions

FunctionDescription
wordpress.setCredentialsSet WordPress site URL and Application Password credentials.
wordpress.listPostsList posts with optional filters.
wordpress.getPostGet a single post by ID.
wordpress.createPostCreate a new post.
wordpress.updatePostUpdate an existing post.
wordpress.deletePostDelete a post (trash or force-delete).
wordpress.listPagesList pages with optional filters.
wordpress.createPageCreate a new page.
wordpress.updatePageUpdate an existing page.
wordpress.deletePageDelete a page (trash or force-delete).
wordpress.listCategoriesList post categories.
wordpress.createCategoryCreate a new category.
wordpress.deleteCategoryPermanently delete a category.
wordpress.listTagsList post tags.
wordpress.createTagCreate a new tag.
wordpress.deleteTagPermanently delete a tag.
wordpress.listCommentsList comments with optional filters.
wordpress.getCommentGet a single comment by ID.
wordpress.createCommentCreate a new comment.
wordpress.updateCommentUpdate an existing comment.
wordpress.deleteCommentDelete a comment (trash or force-delete).
wordpress.moderateCommentChange a comment's moderation status.
wordpress.listMediaList media library items.
wordpress.getMediaGet a media item by ID.
wordpress.uploadMediaUpload a media file.
wordpress.updateMediaUpdate media metadata (title, alt_text, caption, description).
wordpress.deleteMediaPermanently delete a media item.
wordpress.listUsersList users on the site.
wordpress.getUserGet a user by ID.
wordpress.createUserCreate a new user.
wordpress.updateUserUpdate a user's profile.
wordpress.deleteUserDelete a user and reassign their content.
wordpress.getMetaGet custom fields/meta for a post or page.
wordpress.updateMetaUpdate custom fields/meta on a post or page.
wordpress.deleteMetaRemove a custom field/meta key from a post or page.
wordpress.listRevisionsList revisions for a post or page.
wordpress.getRevisionGet a specific revision.
wordpress.deleteRevisionPermanently delete a revision.
wordpress.listTaxonomiesList all registered taxonomies.
wordpress.listTermsList terms for any taxonomy.
wordpress.createTermCreate a term in any taxonomy.
wordpress.listPluginsList all installed plugins with status.
wordpress.activatePluginActivate a plugin.
wordpress.deactivatePluginDeactivate a plugin.
wordpress.installPluginInstall a plugin from the WordPress.org marketplace.
wordpress.deletePluginDelete (uninstall) a plugin. Plugin must be deactivated first.
wordpress.listThemesList all installed themes.
wordpress.activateThemeActivate a theme.
wordpress.getSettingsGet site settings (title, description, timezone, etc.).
wordpress.updateSettingsUpdate site settings.
wordpress.searchGlobal search across all content types.
wordpress.bulkUpdatePostsUpdate multiple posts at once with the same changes.
wordpress.bulkDeletePostsDelete multiple posts at once.

Examples

List posts with optional filters.

wordpress.listPosts {"per_page":5,"status":"publish"}

Get a single post by ID.

wordpress.getPost "123"

Create a new post.

wordpress.createPost {"title":"My Post","content":"<p>Hello</p>","status":"draft"}

Integration with RobinPath

import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/wordpress";

const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);

const result = await rp.executeScript(`
  wordpress.setCredentials "https://mysite.com" "admin" "xxxx xxxx xxxx xxxx"
  wordpress.listPosts {"per_page":5,"status":"publish"}
`);

Full API Reference

See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.

Related Modules

License

MIT

Versions (1)

VersionTagPublished
0.1.0latestyesterday
Install
$ robinpath install @robinpath/wordpress
Version0.1.0
LicenseMIT
Unpacked Size13.0 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

Category

productivity