Skip to main content

wordpress_client 10.2.0 copy "wordpress_client: ^10.2.0" to clipboard
wordpress_client: ^10.2.0 copied to clipboard

A library to interact with the Wordpress REST API. Supports most of the common endpoints and all of the CRUD operations on the endpoints.

example/main.dart

// ignore_for_file: avoid_print

import 'package:wordpress_client/wordpress_client.dart';

Future<void> main() async {
  final client = WordpressClient.forSite(
    siteUrl: Uri.parse('https://wordpress.org/news'),
  );

  final response = await client.posts.list(ListPostRequest(perPage: 5));

  switch (response) {
    case WordpressSuccessResponse(:final data):
      for (final post in data) {
        print('${post.id}: ${post.title?.rendered}');
      }
    case WordpressFailureResponse():
      print('Failed: ${response.error?.message ?? response.message}');
  }

  client.dispose();
}
38
likes
160
points
2.46k
downloads

Documentation

Documentation
API reference

Publisher

verified publisherarunprakashg.com

Weekly Downloads

A library to interact with the Wordpress REST API. Supports most of the common endpoints and all of the CRUD operations on the endpoints.

Repository (GitHub)
View/report issues

Topics

#wordpress #rest-api #graphql #cms #http

Funding

Consider supporting this project:

www.buymeacoffee.com

License

MIT (license)

Dependencies

collection, crypto, dio, http_parser, meta, path

More

Packages that depend on wordpress_client