woocommerce_api 0.0.3

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 37

woocommerce_api #

A dart package to interact with the WooCommerce API. It uses OAuth1.0a behind the scenes to generate the signature and URL string. It then makes calls and return the data back to the calling function.

Getting Started #

  • Import the package

import 'package:woocommerce_api/woocommerce_api.dart';

  • Initialize the SDK
WooCommerceAPI wc_api = new WooCommerceAPI(
    "http://www.mywoocommerce.com",
    "ck_...",
    "cs_..."
);
  • Use functions
List _products = new List();

wc_api.getAsync("products?page=2").then((val) {  
    List parsedMap = JSON.decode(val.body);
    setState(() {
    parsedMap.forEach((f){
        _products.add(f);
    }); 
    print(_products.length);
    });
});

[0.0.3]

Updated SDK version upper limit for new Dart version

[0.0.2]

  • Updated docs

[0.0.1]

  • Added getAsync and postAsync functions.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  woocommerce_api: ^0.0.3

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:woocommerce_api/woocommerce_api.dart';
  
Version Uploaded Documentation Archive
0.0.8 Apr 11, 2019 Go to the documentation of woocommerce_api 0.0.8 Download woocommerce_api 0.0.8 archive
0.0.7 Mar 15, 2019 Go to the documentation of woocommerce_api 0.0.7 Download woocommerce_api 0.0.7 archive
0.0.6 Oct 1, 2018 Go to the documentation of woocommerce_api 0.0.6 Download woocommerce_api 0.0.6 archive
0.0.5 Oct 1, 2018 Go to the documentation of woocommerce_api 0.0.5 Download woocommerce_api 0.0.5 archive
0.0.4 Sep 26, 2018 Go to the documentation of woocommerce_api 0.0.4 Download woocommerce_api 0.0.4 archive
0.0.3 Sep 2, 2018 Go to the documentation of woocommerce_api 0.0.3 Download woocommerce_api 0.0.3 archive
0.0.2 Apr 18, 2018 Go to the documentation of woocommerce_api 0.0.2 Download woocommerce_api 0.0.2 archive
0.0.1 Apr 18, 2018 Go to the documentation of woocommerce_api 0.0.1 Download woocommerce_api 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
74
Health:
Code health derived from static analysis. [more]
--
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
--
Overall:
Weighted score of the above. [more]
37
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Fix dependencies in pubspec.yaml.

Running flutter packages pub upgrade failed with the following output:

ERR: The current Dart SDK version is 2.3.0-dev.0.1.flutter-1f1592edce.
 
 Because woocommerce_api depends on query_string >=1.0.1 which requires SDK version <2.0.0, version solving failed.

Health suggestions

Format lib/woocommerce_api.dart.

Run flutter format to format lib/woocommerce_api.dart.

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Dependencies were not resolved.

The package description is too short. (-13 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and woocommerce_api.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.23.0 <3.0.0