Woodroid : An android woocommerce SDK

Woodroid is an android and java sdk for woocommerce, the ecommerce cms for the popular wordpress. It attempts to create a simple but robust Woocommerce API sdk.

Built-based on the documentation: http://woocommerce.github.io/woocommerce-rest-api-docs/#introduction

Installation

Maven dependency:

Step 1. Add the JitPack repository to your build file

Step 2. Add the dependency

Gradle dependency:

Step 1. Add the JitPack repository to your build file

Step 2. Add the dependency

Getting started

Generate API credentials (Consumer Key & Consumer Secret) following this instructions http://docs.woocommerce.com/document/woocommerce-rest-api/ .

Check out the WooCommerce API endpoints and data that can be manipulated in https://woocommerce.github.io/woocommerce-rest-api-docs/.

Setup

Setup for the new WP REST API integration (WooCommerce 2.6 or later):

Usage

Getting products example

Supported resources

The sdk currently supports :

  1. Order Notes
  2. Refunds
  3. Attributes
  4. Attribute Terms
  5. Product Category
  6. Shipping Class
  7. Product Tags
  8. Variations
  9. Coupons
  10. Customers
  11. Orders
  12. Products
  13. Reports

Coming soon

  1. Settings
  2. Payment gateway

API Methods

The general resource method calls are

  1. Create – Pass the object to create
  2. List – a list of all items
  3. View single method – retries a single item
  4. Delete – deletes the resource
  5. Filter – provides a list that meets a criteria

Create Method

Create an instance of the resource then pass onto a .create() function on the resource repository

List Method

View single item

Delete item

Filter item

Sample app

The sample app implements an MVVM approach which would look slightly different from the above. The methods are the same thoug

Add comment

Recent Posts