- Changed the
getmethod on endpoints tofetch. This has been done to preserve thedartkeywordget. - 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 toexampleorREADME.md
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.
- Fixed return value in
Media Modelforcaptionanddescription
- Renamed libraries to use
lowercase_with_underscoresas suggested on pub.dev
- Implemented rethrow on caught exceptions as suggested on pub.dev
- Added null-safety support. issue #20
- An option to intiailize a custom
Dioinstance. Thanks kellvembarbosa - Added support for a
Jobmodel to render WP Job Manager - Added support for
Application Passwordsmodel introduced in WordPress 5.6 - Added WooCommerce Models for
Product,Ordersand others.
- Refactored codebase in preparation for the stable version 1.0
- Renamed all schemas to match endpoint, e.g
PostSchemais nowPost
- Fixed missing model exports in issue #14
- Fixed
meta fielddata type casting error in issue 15 - Added a working flutter example
metafield now returnsdynamicdata type instead ofList
- Fixed meta data return type in issue #8
- Updated package dependencies
- Renamed
Base*Modelto*, e.gBaseCategoryModelis nowCategory
- Added Search, Taxonomy, Settings, and Pages endpoints.
WPReponseclass was added to handle all responses.- Additional WordPress schemas that can be extended.
- 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
- Removed explicit
nullvariable initializations as suggested by dart analyzer
- Fixed issue when retireving single post in issue #4
- Removed all flutter references because the package also works standalone for dart. Thanks jld3103
- Added Wordpress Standard endpoints as requested in issue #3. These include getPosts(), getCategories(), getTags(), getComments(), and getUsers() functions.
- Minor fixes
- Added endpoint query handler
- Added getAsyc exception
- Fixed the error in JSON endpoint retrieval
- Changed getAsync return raw json body
- Changed example code url
- Changed getAsync return data to a map.
- Updated example and readme
- Added an example
- Updated documentation
- Initial release.