wordpress_api 0.1.2+3 copy "wordpress_api: ^0.1.2+3" to clipboard
wordpress_api: ^0.1.2+3 copied to clipboard

outdated

A WordPress API client for flutter with support for WooCommerce and custom namespaces.

WordPress API client for Dart (Flutter) #

Description #

A WordPress API client for flutter with support for WooCommerce and custom namespaces.

Features #

  • Retrieve data from any endpoint.
  • Retrieve data from any namespace.

Installation #

In the dependencies: section of your pubspec.yaml, add the following line:

wordpress_api: <latest_version>

Usage #

  • Import the package
import 'package:wordpress_api/wordpress_api';
  • Initialize WPAPI
  WordPressAPI api = WordPressAPI('site.com');
  • Retrieve data from an endpoint
  void fetchPosts() async {

    try {
          final res = await api.get('posts');
          print(res['data']);
    } catch (e) {
      throw Exception(e);
    }
  }

To Do #

  • Add authentication function
  • Add postAsync function

Contributions are welcome, report any issues here

99
likes
0
pub points
76%
popularity

Publisher

verified publisherdhmgroup.net

A WordPress API client for flutter with support for WooCommerce and custom namespaces.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, http

More

Packages that depend on wordpress_api