wordpress_api 1.1.0 wordpress_api: ^1.1.0 copied to clipboard
A WordPress REST API client for dart with support for WooCommerce and custom namespaces.
Changelog #
[1.1.0] #
- Changed the
get
method on endpoints tofetch
. This has been done to preserve thedart
keywordget
. - Changed the return turn for each endpoint to
WPResponse
. This changed was made to enable more control over the response returned and also get the necessary meta data returned from the response. Refer toexample
orREADME.md
[1.0.0] #
Breaking Changes/ What's New #
As of v1+, every api endpoint
is set to a getter
. For example,
final WordPressAPI api = WordPressAPI('wp-site.domain');
// Getting posts the OLD WAY
final List<Post> posts = await api.getPosts();
// The new way as of v1.0+
final List<Post> posts = await api.posts.get();
The new way is applicable to categories
, pages
, users
, tags
, taxonomies
, media
, application-passwords
and any other endpoints to be added.
[0.3.1] #
- Fixed return value in
Media Model
forcaption
anddescription
[0.3.0] #
What's new? #
- Added null-safety support. issue #20
- An option to intiailize a custom
Dio
instance. Thanks kellvembarbosa - Added support for a
Job
model to render WP Job Manager - Added support for
Application Passwords
model introduced in WordPress 5.6 - Added WooCommerce Models for
Product
,Orders
and others.
What's changed? #
- Refactored codebase in preparation for the stable version 1.0
- Renamed all schemas to match endpoint, e.g
PostSchema
is nowPost
[0.2.1+1] #
[0.2.0] #
[0.1.4] #
- Add models for Category, Comment, Media, Post, Tag and User.
- Each model has a 'BASE' prefix and 'MODEL' suffix with all the default response params, e.g BaseUserModel
[0.1.3+2] #
- Removed explicit
null
variable initializations as suggested by dart analyzer
[0.1.3] #
[0.1.2+3] #
- Minor fixes
[0.1.2+2] #
- Added endpoint query handler
[0.1.2+1] #
- Added getAsyc exception
[0.1.2] #
- Fixed the error in JSON endpoint retrieval
[0.1.1+2] #
- Changed getAsync return raw json body
- Changed example code url
[0.1.1+1] #
- Changed getAsync return data to a map.
[0.1.1] #
- Updated example and readme
[0.1.0] #
- Added an example
[0.0.2] #
- Updated documentation
[0.0.1] #
- Initial release.