From 42542ecafe3cbfc620159d1e09c6306c1eec0923 Mon Sep 17 00:00:00 2001 From: Gilbert Kimutai Date: Sun, 3 Feb 2019 12:22:09 +0300 Subject: [PATCH 1/3] Added usage example --- README.md | 43 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ebf64b0..d6af1cb 100644 --- a/README.md +++ b/README.md @@ -6,15 +6,50 @@ This is an android sdk for woocommerce Built-based on the documentation: http://woocommerce.github.io/woocommerce-rest-api-docs/#introduction +## Installation -#### Maven dependency: +### Maven dependency: ```xml TODO ``` -#### Gradle dependency: +### Gradle dependency: TODO -#### Usage +## Getting started -TODO +Generate API credentials (Consumer Key & Consumer Secret) following this instructions +. + +Check out the WooCommerce API endpoints and data that can be manipulated in . + +## Setup + +Setup for the new WP REST API integration (WooCommerce 2.6 or later): + +```kotlin + val woocommerce = Woocommerce.Builder() + .setSiteUrl("http://example.com") + .setApiVersion("2") + .setConsumerKey("ck_XXXXX") + .setConsumerSecret("cs_XXXX") + .build() +``` + +## Usage +Getting products example + +```kotlin + woocommerce.products.enqueue(object : Callback> { + override fun onResponse(call: Call>, response: Response>) { + val products = response.body() + for (product in products!!) { + tvText.append(product.title + "\n") + } + } + + override fun onFailure(call: Call>, t: Throwable) { + + } + }) +``` From 5909a0e1224f907b0e023a5f05d754c32777ef18 Mon Sep 17 00:00:00 2001 From: Gilbert Kimutai Date: Sun, 3 Feb 2019 12:23:14 +0300 Subject: [PATCH 2/3] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index d6af1cb..3502ac2 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,9 @@ TODO ``` ### Gradle dependency: +```xml TODO +``` ## Getting started From 77aacaf89cd754e5d8cb1cfe06041c50a0ccf9d5 Mon Sep 17 00:00:00 2001 From: Gilbert Kimutai Date: Sun, 3 Feb 2019 12:35:09 +0300 Subject: [PATCH 3/3] Update README.md --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index 3502ac2..76e95cd 100644 --- a/README.md +++ b/README.md @@ -55,3 +55,32 @@ Getting products example } }) ``` + +## API Support Checklist + +Method | Create | Delete | Retrieve | Update | Batch +--------------------- | ------------- | ------------- | ------------- | ------------- | ------------- +Coupons | N | N | N | N | N +Customers | N | N | N | N | N +Orders | N | N | N | N | N +Order notes | N | N | N | N | N +Refunds | N | N | N | N | N +Products | N | N | N | N | N +Product variations | N | N | N | N | N +Product attributes | N | N | N | N | N +Product attribute terms | N | N | N | N | N +Product categories | N | N | N | N | N +Product shipping classes | N | N | N | N | N +Product tags | N | N | N | N | N +Product reviews | N | N | N | N | N +Reports | N | N | N | N | N +Tax rates | N | N | N | N | N +Tax classes | N | N | N | N | N +Webhooks | N | N | N | N | N +Settings | N | N | N | N | N +Setting options | N | N | N | N | N +Payment gateways | N | N | N | N | N +Shipping zones | N | N | N | N | N +Shipping zone locations | N | N | N | N | N +Shipping zone methods | N | N | N | N | N +Shipping methods | N | N | N | N | N