Skip to content

Evref-BL/Wordpress-Pharo-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Wordpress-Pharo-API

This is a client for the WordpressAPI.

Installation

Metacello new
  githubUser: 'Evref-BL' project: 'Wordpress-Pharo-API' commitish: 'main' path: 'src';
  baseline: 'WordpressPharoAPI';
  load

Connect the API to Wordpress

The first step before querying is to connect to the Wordpress API.

wordpressAPI := WordpressPharoAPI new.
wordpressAPI endpoint: '<mywordpress>'.
wordpressAPI username: '<myusername>' password: '<mypassword>'.

Example

Get recent posts

wordpressAPI getPosts

Publish a post

myPost := WPPost new.
myPost date: DateAndTime tomorrow.
myPost status: 'draft'.
myPost title: 'FirstTest'.
myPost author: 28.
myPost content: 'First content'.

wordpressAPI createPost: myPost.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published