Releases: dhmgroup/dart-wp
Releases · dhmgroup/dart-wp
v1.2.0+1
What's Changed
- updated to v1.0 with endpoints by @theeomm in #22
- updated to v1.1.0 by @theeomm in #23
- add _Embeded, add some null check by @ankiimation in #28
- docs: add ankiimation as a contributor for code by @allcontributors in #29
- docs: add kellvembarbosa as a contributor for code by @allcontributors in #30
- [fix] change the Utils class to WPUtils to remove error by @NemesisX1 in #31
- Check Key "roles" by @okandemirofficial in #40
- Bugfix/embedded author by @NKlage in #41
- docs: add NKlage as a contributor for code, and bug by @allcontributors in #42
- docs: add NemesisX1 as a contributor for code by @allcontributors in #43
- docs: add okandemirofficial as a contributor for code by @allcontributors in #44
New Contributors
- @ankiimation made their first contribution in #28
- @allcontributors made their first contribution in #29
- @NemesisX1 made their first contribution in #31
- @okandemirofficial made their first contribution in #40
- @NKlage made their first contribution in #41
Full Changelog: v1.1.0...v1.2.0+1
v1.2.0
What's New
- A new utility abstract class
WPUtilshas been introduced. This class contains some useful functions. - Added
EmbedModelthanks Ankii
What Changed
- In response to issue #26 , the HTML tags have been preserved. In order to parse the HTML, a utility function from
WPUtilsis now available as shown in the example below.
void main() async {
final api = WordPressAPI('site.com');
final res = await api.posts.fetch();
for (final post in res.data as List<Post>) {
// This will provide the content as it is without stripping the HTML tags.
print(post.content);
// This will strip all the HTML tags using parseHtml from WPUtils
print(WPUtils.parseHtml(post.content));
}
}
Other contributions
- Thanks NemesisX1 for prefixing the
Utilsclass - Updated
Loggertov1.1.0
v1.1.0
Breaking Changes
- 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 metadata returned from the response.
Example 1: Fetch multiple posts
void main() async {
final api = WordPressAPI('wp-site.domain');
final WPResponse res = await api.posts.fetch();
for (final post in res.data) {
print(post.title);
}
}Example 2: Fetch a single posts
void main() async {
final api = WordPressAPI('wp-site.domain');
final WPResponse res = await api.posts.fetch(id: 26);
final Post post = res.data;
print(post);
}v1.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.
v0.3.1
v0.3.0+2
v0.3.0+1
v0.3.0
What's new?
- Added null-safety support. issue #20
- An option to initialize 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.
What's changed?
- Refactored codebase in preparation for the stable version 1.0
- Renamed all schemas to match endpoint, e.g
PostSchemais nowPost
v0.2.1
Release v0.2.0
Breaking Changes
- Renamed
Base*Modelto*Schema, e.gBaseCategoryModelis nowCategorySchema
What's New
- Added Search, Taxonomy, Settings, and Pages endpoints.
WPReponseclass was added to handle all responses.- Additional WordPress schemas that can be extended.