woocommerce_client 1.0.4 copy "woocommerce_client: ^1.0.4" to clipboard
woocommerce_client: ^1.0.4 copied to clipboard

Woocommerce Rest API Dart client package

woocommerce_client #

A Dart package built using openapi. With further customization and changes to achieve ease of use and support for additional protocols such as http. All methods and types are implemented, enabling seamless integration with Dart applications.

  • Woocommerce API v3
  • HTTP and HTTPS support
  • Null-Safety
  • Supports all methods and models

Requirements #

Dart 2.12 or later

Installation & Usage #

Official repository #

Include woocommerce_client in your pubspec.yaml file:

dependencies:
  woocommerce_client: ^1.0.4

Github #

You can install this package using git like the following example:

dependencies:
  woocommerce_client:
    git: https://github.com/erfanshekari/woocommerce_client

Local #

You can also clone this repository in your project and add it to your project like the following example:

dependencies:
  woocommerce_client:
    path: /path/to/woocommerce_client

Examples #

Fetch products

import 'package:woocommerce_client/woocommerce_client.dart';

void main() async {
  final api = Woocommerce(
    baseURL: 'http://woocommerce.ir',
    consumerKey: 'consumer_key',
    consumerSecret: 'consumer_secret',
  );

  List<Product>? response = await api.productsGet(perPage: 10);

  print(response?.length);
}

Fetch customer by unique ID

import 'package:woocommerce_client/woocommerce_client.dart';

void main() async {

  final api = Woocommerce(
    baseURL: 'http://woocommerce.ir',
    consumerKey: 'consumer_key',
    consumerSecret: 'consumer_secret',
  );

  Customer? response = await api.customersIdGet(1);

}

Documentation For Models #

Contributing #

We welcome contributions from the community! If you'd like to contribute to this project, please follow these guidelines:

  1. Fork the repository on GitHub.
  2. Create a new branch with a descriptive name for your feature or bug fix.
  3. Make your changes and commit them, providing a clear and concise commit message.
  4. Push your changes to your fork.
  5. Submit a pull request to the main repository's main branch.

Reporting Issues #

If you encounter any issues with the project or have suggestions for improvements, please feel free to open an issue.

12
likes
0
pub points
68%
popularity

Publisher

unverified uploader

Woocommerce Rest API Dart client package

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

collection, crypto, http

More

Packages that depend on woocommerce_client