shopware_sdk 0.1.0+4 copy "shopware_sdk: ^0.1.0+4" to clipboard
shopware_sdk: ^0.1.0+4 copied to clipboard

outdated

Future-based Dart SDK for the Shopware 5 REST API.

pub package

shopware_sdk #

Future-based Dart SDK for the Shopware 5 REST API.

Usage #

   import 'package:shopware_sdk/shopware_sdk.dart';
   
   
   main() async {
     // Create a new client
     var client = ShopwareClient(
           baseUrl: BASE_URL, 
           username: USERNAME, 
           apiToken: API_TOKEN
       );
   
     var categoryResource = new CategoriesResource(client);
   
     // Get category with id 39
     ApiResponse<Category> apiResponse = await categoryResource.findOne(39);
   
     if (apiResponse.success) {
       // if api response successfully returned
   
       var category = apiResponse.entity;
   
       print("${category.id} - ${category.name}");
   
       // print category entity
       print(category);
   
       // print returned api response
       print(apiResponse.jsonResponse);
     } else {
       // print error message
   
       print(apiResponse.message);
       print(apiResponse.baseResponse.statusCode);
     }
   }
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Future-based Dart SDK for the Shopware 5 REST API.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

http

More

Packages that depend on shopware_sdk