File tree Expand file tree Collapse file tree 4 files changed +22
-2
lines changed Expand file tree Collapse file tree 4 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 1+ ## [ 1.2.0] - 2020-09-05
2+
3+ * New method to retrieve a product
4+
15## [ 1.1.2] - 2020-07-22
26
37* Update FreeShipping model for minimum spend
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ In your flutter project add the dependency:
1515``` dart
1616dependencies:
1717 ...
18- woosignal: ^1.1.2
18+ woosignal: ^1.2.0
1919```
2020
2121### Usage example #
Original file line number Diff line number Diff line change @@ -153,6 +153,22 @@ class WooSignal {
153153 return products;
154154 }
155155
156+ /// https://woosignal.com/docs/api/1.0/products#retrive-a-product-api-call
157+ Future <Product > retrieveProduct (
158+ {int id}) async {
159+ Map <String , dynamic > payload = {};
160+
161+ _printLog ("Parameters: " + payload.toString ());
162+ payload = _standardPayload ("get" , payload, "products/${id .toString ()}" );
163+
164+ Product product;
165+ await _apiProvider.post ("/request" , payload).then ((json) {
166+ product = Product .fromJson (json);
167+ });
168+ _printLog (product.toString ());
169+ return product;
170+ }
171+
156172 /// https://woosignal.com/docs/api/1.0/products-variations
157173 Future <List <ProductVariation >> getProductVariations (int productId,
158174 {int page,
Original file line number Diff line number Diff line change 11name : woosignal
22description : WooCommerce REST API for dart, connect a WooCommerce store and start developing with our interface for their API endpoints.
3- version : 1.1.2
3+ version : 1.2.0
44homepage : https://woosignal.com
55repository : https://github.com/woosignal/flutter-woocommerce-api
66issue_tracker : https://github.com/woosignal/flutter-woocommerce-api/issues
You can’t perform that action at this time.
0 commit comments