Skip to content

Releases: dhmgroup/dart-wp

v1.2.0+1

Choose a tag to compare

@theeomm theeomm released this 29 Jul 23:46
e39f22e

What's Changed

New Contributors

Full Changelog: v1.1.0...v1.2.0+1

v1.2.0

Choose a tag to compare

@theeomm theeomm released this 22 Sep 11:59

What's New

  • A new utility abstract class WPUtils has been introduced. This class contains some useful functions.
  • Added EmbedModel thanks Ankii

What Changed

  • In response to issue #26 , the HTML tags have been preserved. In order to parse the HTML, a utility function from WPUtils is 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 Utils class
  • Updated Logger to v1.1.0

v1.1.0

Choose a tag to compare

@theeomm theeomm released this 02 May 08:38

Breaking Changes

  • Changed the get method on endpoints to fetch. This has been done to preserve the dart keyword get.
  • 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

Choose a tag to compare

@theeomm theeomm released this 02 May 04:07

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

Choose a tag to compare

@theeomm theeomm released this 30 Apr 09:01
updated version and changelog

v0.3.0+2

Choose a tag to compare

@theeomm theeomm released this 19 Apr 14:24
renamed libraries

v0.3.0+1

Choose a tag to compare

@theeomm theeomm released this 19 Apr 11:42

Implemented rethrow on caught exceptions as suggested on pub.dev

v0.3.0

Choose a tag to compare

@theeomm theeomm released this 19 Apr 11:44

What's new?

What's changed?

  • Refactored codebase in preparation for the stable version 1.0
  • Renamed all schemas to match endpoint, e.g PostSchema is now Post

v0.2.1

Choose a tag to compare

@theeomm theeomm released this 09 Oct 04:19
  • Fixed issue #8.
  • Updates package dependencies

Release v0.2.0

Choose a tag to compare

@theeomm theeomm released this 22 Jul 23:29

Breaking Changes

  • Renamed Base*Model to *Schema, e.g BaseCategoryModel is now CategorySchema

What's New

  • Added Search, Taxonomy, Settings, and Pages endpoints.
  • WPReponse class was added to handle all responses.
  • Additional WordPress schemas that can be extended.