This is a client for the WordpressAPI.
Metacello new
githubUser: 'Evref-BL' project: 'Wordpress-Pharo-API' commitish: 'main' path: 'src';
baseline: 'WordpressPharoAPI';
load
The first step before querying is to connect to the Wordpress API.
wordpressAPI := WordpressPharoAPI new.
wordpressAPI endpoint: '<mywordpress>'.
wordpressAPI username: '<myusername>' password: '<mypassword>'.
wordpressAPI getPosts
myPost := WPPost new.
myPost date: DateAndTime tomorrow.
myPost status: 'draft'.
myPost title: 'FirstTest'.
myPost author: 28.
myPost content: 'First content'.
wordpressAPI createPost: myPost.