mezzanine_dart_client 1.0.2

Mezzanine Dart Client #

A Dart client for the REST Web API for Mezzanine with Cartridge

This Dart package is automatically generated by the Swagger Codegen project (for the most part)

  • API version: 1.5.16
  • Build package: io.swagger.codegen.languages.DartClientCodegen

Requirements #

Dart 1.20.0 or later OR Flutter 0.0.20 or later

Installation & Usage

Github #

If installing from Github, include the following in pubspec.yaml

name: mezzanine_dart_client
version: 1.0.0
description: A Dart client for the REST Web API for Mezzanine with Cartridge
dependencies:
  mezzanine_dart_client:
    git: https://github.com/jackvz/mezzanine-cartridge-api
      version: 'any'

Local #

To use the package in your local drive, include the following in pubspec.yaml

dependencies:
  mezzanine_dart_client:
    path: /path/to/mezzanine_dart_client

Getting Started #

import 'package:mezzanine_dart_client/api.dart';

// TODO Configure API key authorization: API Secret Key
//mezzanine_dart_client.api.Configuration.apiKey{'Api-Secret-Key'} = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//mezzanine_dart_client.api.Configuration.apiKeyPrefix{'Api-Secret-Key'} = "Bearer";
// TODO Configure API key authorization: API Token
//mezzanine_dart_client.api.Configuration.apiKey{'Api-Token'} = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//mezzanine_dart_client.api.Configuration.apiKeyPrefix{'Api-Token'} = "Bearer";

var api_instance = new AssignedkeywordsApi();
var data = new AssignedKeyword(); // AssignedKeyword | 

try {
    var result = api_instance.assignedkeywordsCreate(data);
    print(result);
} catch (e) {
    print("Exception when calling AssignedkeywordsApi->assignedkeywordsCreate: $e\n");
}

Documentation for API Endpoints #

All URIs are relative to https://localhost/api

ClassMethodHTTP requestDescription
AssignedkeywordsApiassignedkeywordsCreatePOST /assignedkeywords/
AssignedkeywordsApiassignedkeywordsDeleteDELETE /assignedkeywords/{id}/
AssignedkeywordsApiassignedkeywordsListGET /assignedkeywords/
AssignedkeywordsApiassignedkeywordsPartialUpdatePATCH /assignedkeywords/{id}/
AssignedkeywordsApiassignedkeywordsReadGET /assignedkeywords/{id}/
AssignedkeywordsApiassignedkeywordsUpdatePUT /assignedkeywords/{id}/
BlogcategoriesApiblogcategoriesCreatePOST /blogcategories/
BlogcategoriesApiblogcategoriesDeleteDELETE /blogcategories/{id}/
BlogcategoriesApiblogcategoriesListGET /blogcategories/
BlogcategoriesApiblogcategoriesPartialUpdatePATCH /blogcategories/{id}/
BlogcategoriesApiblogcategoriesReadGET /blogcategories/{id}/
BlogcategoriesApiblogcategoriesUpdatePUT /blogcategories/{id}/
BlogpostsApiblogpostsCreatePOST /blogposts/
BlogpostsApiblogpostsDeleteDELETE /blogposts/{id}/
BlogpostsApiblogpostsListGET /blogposts/
BlogpostsApiblogpostsPartialUpdatePATCH /blogposts/{id}/
BlogpostsApiblogpostsReadGET /blogposts/{id}/
BlogpostsApiblogpostsUpdatePUT /blogposts/{id}/
CartitemsApicartitemsCreatePOST /cartitems/
CartitemsApicartitemsDeleteDELETE /cartitems/{id}/
CartitemsApicartitemsListGET /cartitems/
CartitemsApicartitemsPartialUpdatePATCH /cartitems/{id}/
CartitemsApicartitemsReadGET /cartitems/{id}/
CartitemsApicartitemsUpdatePUT /cartitems/{id}/
CartsApicartsBillingShippingPOST /carts/{id}/billing-shipping/
CartsApicartsCreatePOST /carts/
CartsApicartsDeleteDELETE /carts/{id}/
CartsApicartsListGET /carts/
CartsApicartsOrderPlacementPOST /carts/{id}/order-placement/
CartsApicartsPartialUpdatePATCH /carts/{id}/
CartsApicartsPaymentPOST /carts/{id}/payment/
CartsApicartsReadGET /carts/{id}/
CartsApicartsTaxPOST /carts/{id}/tax/
CartsApicartsUpdatePUT /carts/{id}/
CategoriesApicategoriesCreatePOST /categories/
CategoriesApicategoriesDeleteDELETE /categories/{id}/
CategoriesApicategoriesListGET /categories/
CategoriesApicategoriesPartialUpdatePATCH /categories/{id}/
CategoriesApicategoriesReadGET /categories/{id}/
CategoriesApicategoriesUpdatePUT /categories/{id}/
DiscountcodesApidiscountcodesCreatePOST /discountcodes/
DiscountcodesApidiscountcodesDeleteDELETE /discountcodes/{id}/
DiscountcodesApidiscountcodesListGET /discountcodes/
DiscountcodesApidiscountcodesPartialUpdatePATCH /discountcodes/{id}/
DiscountcodesApidiscountcodesReadGET /discountcodes/{id}/
DiscountcodesApidiscountcodesUpdatePUT /discountcodes/{id}/
GalleriesApigalleriesCreatePOST /galleries/
GalleriesApigalleriesDeleteDELETE /galleries/{id}/
GalleriesApigalleriesListGET /galleries/
GalleriesApigalleriesPartialUpdatePATCH /galleries/{id}/
GalleriesApigalleriesReadGET /galleries/{id}/
GalleriesApigalleriesUpdatePUT /galleries/{id}/
GalleryimagesApigalleryimagesCreatePOST /galleryimages/
GalleryimagesApigalleryimagesDeleteDELETE /galleryimages/{id}/
GalleryimagesApigalleryimagesListGET /galleryimages/
GalleryimagesApigalleryimagesPartialUpdatePATCH /galleryimages/{id}/
GalleryimagesApigalleryimagesReadGET /galleryimages/{id}/
GalleryimagesApigalleryimagesUpdatePUT /galleryimages/{id}/
GroupsApigroupsCreatePOST /groups/
GroupsApigroupsDeleteDELETE /groups/{id}/
GroupsApigroupsListGET /groups/
GroupsApigroupsPartialUpdatePATCH /groups/{id}/
GroupsApigroupsReadGET /groups/{id}/
GroupsApigroupsUpdatePUT /groups/{id}/
OrderitemsApiorderitemsCreatePOST /orderitems/
OrderitemsApiorderitemsDeleteDELETE /orderitems/{id}/
OrderitemsApiorderitemsListGET /orderitems/
OrderitemsApiorderitemsPartialUpdatePATCH /orderitems/{id}/
OrderitemsApiorderitemsReadGET /orderitems/{id}/
OrderitemsApiorderitemsUpdatePUT /orderitems/{id}/
OrdersApiordersCreatePOST /orders/
OrdersApiordersDeleteDELETE /orders/{id}/
OrdersApiordersListGET /orders/
OrdersApiordersPartialUpdatePATCH /orders/{id}/
OrdersApiordersReadGET /orders/{id}/
OrdersApiordersUpdatePUT /orders/{id}/
PagesApipagesCreatePOST /pages/
PagesApipagesDeleteDELETE /pages/{id}/
PagesApipagesListGET /pages/
PagesApipagesPartialUpdatePATCH /pages/{id}/
PagesApipagesReadGET /pages/{id}/
PagesApipagesUpdatePUT /pages/{id}/
ProductimagesApiproductimagesCreatePOST /productimages/
ProductimagesApiproductimagesDeleteDELETE /productimages/{id}/
ProductimagesApiproductimagesListGET /productimages/
ProductimagesApiproductimagesPartialUpdatePATCH /productimages/{id}/
ProductimagesApiproductimagesReadGET /productimages/{id}/
ProductimagesApiproductimagesUpdatePUT /productimages/{id}/
ProductoptionsApiproductoptionsCreatePOST /productoptions/
ProductoptionsApiproductoptionsDeleteDELETE /productoptions/{id}/
ProductoptionsApiproductoptionsListGET /productoptions/
ProductoptionsApiproductoptionsPartialUpdatePATCH /productoptions/{id}/
ProductoptionsApiproductoptionsReadGET /productoptions/{id}/
ProductoptionsApiproductoptionsUpdatePUT /productoptions/{id}/
ProductsApiproductsCreatePOST /products/
ProductsApiproductsDeleteDELETE /products/{id}/
ProductsApiproductsListGET /products/
ProductsApiproductsPartialUpdatePATCH /products/{id}/
ProductsApiproductsReadGET /products/{id}/
ProductsApiproductsUpdatePUT /products/{id}/
ProductvariationsApiproductvariationsCreatePOST /productvariations/
ProductvariationsApiproductvariationsDeleteDELETE /productvariations/{id}/
ProductvariationsApiproductvariationsListGET /productvariations/
ProductvariationsApiproductvariationsPartialUpdatePATCH /productvariations/{id}/
ProductvariationsApiproductvariationsReadGET /productvariations/{id}/
ProductvariationsApiproductvariationsUpdatePUT /productvariations/{id}/
RatingsApiratingsCreatePOST /ratings/
RatingsApiratingsDeleteDELETE /ratings/{id}/
RatingsApiratingsListGET /ratings/
RatingsApiratingsPartialUpdatePATCH /ratings/{id}/
RatingsApiratingsReadGET /ratings/{id}/
RatingsApiratingsUpdatePUT /ratings/{id}/
RedirectsApiredirectsCreatePOST /redirects/
RedirectsApiredirectsDeleteDELETE /redirects/{id}/
RedirectsApiredirectsListGET /redirects/
RedirectsApiredirectsPartialUpdatePATCH /redirects/{id}/
RedirectsApiredirectsReadGET /redirects/{id}/
RedirectsApiredirectsUpdatePUT /redirects/{id}/
SalesApisalesCreatePOST /sales/
SalesApisalesDeleteDELETE /sales/{id}/
SalesApisalesListGET /sales/
SalesApisalesPartialUpdatePATCH /sales/{id}/
SalesApisalesReadGET /sales/{id}/
SalesApisalesUpdatePUT /sales/{id}/
SettingsApisettingsCreatePOST /settings/
SettingsApisettingsDeleteDELETE /settings/{id}/
SettingsApisettingsListGET /settings/
SettingsApisettingsPartialUpdatePATCH /settings/{id}/
SettingsApisettingsReadGET /settings/{id}/
SettingsApisettingsUpdatePUT /settings/{id}/
SitesApisitesCreatePOST /sites/
SitesApisitesDeleteDELETE /sites/{id}/
SitesApisitesListGET /sites/
SitesApisitesPartialUpdatePATCH /sites/{id}/
SitesApisitesReadGET /sites/{id}/
SitesApisitesUpdatePUT /sites/{id}/
SystemsettingsApisystemsettingsListGET /systemsettings/
ThreadedcommentsApithreadedcommentsCreatePOST /threadedcomments/
ThreadedcommentsApithreadedcommentsDeleteDELETE /threadedcomments/{id}/
ThreadedcommentsApithreadedcommentsListGET /threadedcomments/
ThreadedcommentsApithreadedcommentsPartialUpdatePATCH /threadedcomments/{id}/
ThreadedcommentsApithreadedcommentsReadGET /threadedcomments/{id}/
ThreadedcommentsApithreadedcommentsUpdatePUT /threadedcomments/{id}/
UsersApiusersActivatePOST /users/{id}/activate/
UsersApiusersCheckPasswordPOST /users/check-password/
UsersApiusersCheckTokenPOST /users/{id}/check-token/
UsersApiusersCreatePOST /users/
UsersApiusersDeleteDELETE /users/{id}/
UsersApiusersListGET /users/
UsersApiusersPartialUpdatePATCH /users/{id}/
UsersApiusersReadGET /users/{id}/
UsersApiusersResetPasswordPOST /users/reset-password/
UsersApiusersSetPasswordPOST /users/{id}/set-password/
UsersApiusersUpdatePUT /users/{id}/

Documentation For Models #

Documentation For Authorization #

API Secret Key #

  • Type: API key
  • API key parameter name: Api-Secret-Key
  • Location: HTTP header

API Token #

  • Type: API key
  • API key parameter name: Api-Token
  • Location: HTTP header

Use this package as a library

1. Depend on it

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


dependencies:
  mezzanine_dart_client: ^1.0.2

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:mezzanine_dart_client/api.dart';
import 'package:mezzanine_dart_client/api/assignedkeywords_api.dart';
import 'package:mezzanine_dart_client/api/blogcategories_api.dart';
import 'package:mezzanine_dart_client/api/blogposts_api.dart';
import 'package:mezzanine_dart_client/api/cartitems_api.dart';
import 'package:mezzanine_dart_client/api/carts_api.dart';
import 'package:mezzanine_dart_client/api/categories_api.dart';
import 'package:mezzanine_dart_client/api/discountcodes_api.dart';
import 'package:mezzanine_dart_client/api/galleries_api.dart';
import 'package:mezzanine_dart_client/api/galleryimages_api.dart';
import 'package:mezzanine_dart_client/api/groups_api.dart';
import 'package:mezzanine_dart_client/api/orderitems_api.dart';
import 'package:mezzanine_dart_client/api/orders_api.dart';
import 'package:mezzanine_dart_client/api/pages_api.dart';
import 'package:mezzanine_dart_client/api/productimages_api.dart';
import 'package:mezzanine_dart_client/api/productoptions_api.dart';
import 'package:mezzanine_dart_client/api/products_api.dart';
import 'package:mezzanine_dart_client/api/productvariations_api.dart';
import 'package:mezzanine_dart_client/api/ratings_api.dart';
import 'package:mezzanine_dart_client/api/redirects_api.dart';
import 'package:mezzanine_dart_client/api/sales_api.dart';
import 'package:mezzanine_dart_client/api/settings_api.dart';
import 'package:mezzanine_dart_client/api/sites_api.dart';
import 'package:mezzanine_dart_client/api/systemsettings_api.dart';
import 'package:mezzanine_dart_client/api/threadedcomments_api.dart';
import 'package:mezzanine_dart_client/api/users_api.dart';
import 'package:mezzanine_dart_client/api_client.dart';
import 'package:mezzanine_dart_client/api_exception.dart';
import 'package:mezzanine_dart_client/api_helper.dart';
import 'package:mezzanine_dart_client/auth/api_key_auth.dart';
import 'package:mezzanine_dart_client/auth/authentication.dart';
import 'package:mezzanine_dart_client/auth/http_basic_auth.dart';
import 'package:mezzanine_dart_client/auth/oauth.dart';
import 'package:mezzanine_dart_client/model/assigned_keyword.dart';
import 'package:mezzanine_dart_client/model/blog_category.dart';
import 'package:mezzanine_dart_client/model/blog_post.dart';
import 'package:mezzanine_dart_client/model/cart.dart';
import 'package:mezzanine_dart_client/model/cart_billing_shipping.dart';
import 'package:mezzanine_dart_client/model/cart_item.dart';
import 'package:mezzanine_dart_client/model/cart_payment.dart';
import 'package:mezzanine_dart_client/model/cart_tax.dart';
import 'package:mezzanine_dart_client/model/category.dart';
import 'package:mezzanine_dart_client/model/category_product_many_to_many_through.dart';
import 'package:mezzanine_dart_client/model/discount_code.dart';
import 'package:mezzanine_dart_client/model/gallery.dart';
import 'package:mezzanine_dart_client/model/gallery_image.dart';
import 'package:mezzanine_dart_client/model/group.dart';
import 'package:mezzanine_dart_client/model/order.dart';
import 'package:mezzanine_dart_client/model/order_form.dart';
import 'package:mezzanine_dart_client/model/order_item.dart';
import 'package:mezzanine_dart_client/model/order_placement.dart';
import 'package:mezzanine_dart_client/model/page.dart';
import 'package:mezzanine_dart_client/model/product.dart';
import 'package:mezzanine_dart_client/model/product_image.dart';
import 'package:mezzanine_dart_client/model/product_option.dart';
import 'package:mezzanine_dart_client/model/product_product_many_to_many_through.dart';
import 'package:mezzanine_dart_client/model/product_variation.dart';
import 'package:mezzanine_dart_client/model/rating.dart';
import 'package:mezzanine_dart_client/model/redirect.dart';
import 'package:mezzanine_dart_client/model/sale.dart';
import 'package:mezzanine_dart_client/model/setting.dart';
import 'package:mezzanine_dart_client/model/site.dart';
import 'package:mezzanine_dart_client/model/system_setting.dart';
import 'package:mezzanine_dart_client/model/threaded_comment.dart';
import 'package:mezzanine_dart_client/model/user.dart';
import 'package:mezzanine_dart_client/model/user_activation.dart';
import 'package:mezzanine_dart_client/model/user_password_check.dart';
import 'package:mezzanine_dart_client/model/user_password_reset.dart';
import 'package:mezzanine_dart_client/model/user_password_set.dart';
import 'package:mezzanine_dart_client/model/user_token_check.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
16
Health:
Code health derived from static analysis. [more]
2
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
50
Overall:
Weighted score of the above. [more]
18
Learn more about scoring.

We analyzed this package on Oct 21, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in libraries.

Health suggestions

Fix lib/model/order.dart. (-15.67 points)

Analysis of lib/model/order.dart reported 34 hints, including:

line 5 col 7: Don't explicitly initialize variables to null.

line 11 col 10: Don't explicitly initialize variables to null.

line 14 col 10: Don't explicitly initialize variables to null.

line 17 col 10: Don't explicitly initialize variables to null.

line 20 col 10: Don't explicitly initialize variables to null.

Fix lib/model/category_product_many_to_many_through.dart. (-14.39 points)

Analysis of lib/model/category_product_many_to_many_through.dart reported 31 hints, including:

line 5 col 7: Don't explicitly initialize variables to null.

line 8 col 10: Don't explicitly initialize variables to null.

line 11 col 7: Don't explicitly initialize variables to null.

line 14 col 7: Don't explicitly initialize variables to null.

line 17 col 7: Don't explicitly initialize variables to null.

Fix lib/model/product.dart. (-14.39 points)

Analysis of lib/model/product.dart reported 31 hints, including:

line 5 col 7: Don't explicitly initialize variables to null.

line 23 col 10: Don't explicitly initialize variables to null.

line 26 col 7: Don't explicitly initialize variables to null.

line 29 col 7: Don't explicitly initialize variables to null.

line 32 col 7: Don't explicitly initialize variables to null.

Fix additional 67 files with analysis or formatting issues. (-345.41 points)

Additional issues in the following files:

  • lib/model/product_product_many_to_many_through.dart (31 hints)
  • lib/model/order_form.dart (29 hints)
  • lib/model/category.dart (28 hints)
  • lib/api/users_api.dart (25 hints)
  • lib/model/blog_post.dart (24 hints)
  • lib/model/gallery.dart (24 hints)
  • lib/api/carts_api.dart (23 hints)
  • lib/model/page.dart (22 hints)
  • lib/model/threaded_comment.dart (19 hints)
  • lib/api/assignedkeywords_api.dart (15 hints)
  • lib/api/blogcategories_api.dart (15 hints)
  • lib/api/blogposts_api.dart (15 hints)
  • lib/api/cartitems_api.dart (15 hints)
  • lib/api/categories_api.dart (15 hints)
  • lib/api/discountcodes_api.dart (15 hints)
  • lib/api/galleries_api.dart (15 hints)
  • lib/api/galleryimages_api.dart (15 hints)
  • lib/api/groups_api.dart (15 hints)
  • lib/api/orderitems_api.dart (15 hints)
  • lib/api/orders_api.dart (15 hints)
  • lib/api/pages_api.dart (15 hints)
  • lib/api/productimages_api.dart (15 hints)
  • lib/api/productoptions_api.dart (15 hints)
  • lib/api/products_api.dart (15 hints)
  • lib/api/productvariations_api.dart (15 hints)
  • lib/api/ratings_api.dart (15 hints)
  • lib/api/redirects_api.dart (15 hints)
  • lib/api/sales_api.dart (15 hints)
  • lib/api/settings_api.dart (15 hints)
  • lib/api/sites_api.dart (15 hints)
  • lib/api/threadedcomments_api.dart (15 hints)
  • lib/model/product_variation.dart (14 hints)
  • lib/model/discount_code.dart (13 hints)
  • lib/model/user.dart (12 hints)
  • lib/model/cart_item.dart (10 hints)
  • lib/model/sale.dart (9 hints)
  • lib/model/order_item.dart (8 hints)
  • lib/model/rating.dart (7 hints)
  • lib/model/assigned_keyword.dart (6 hints)
  • lib/model/gallery_image.dart (6 hints)
  • lib/model/product_image.dart (6 hints)
  • lib/model/blog_category.dart (5 hints)
  • lib/model/cart_payment.dart (5 hints)
  • lib/model/cart_tax.dart (5 hints)
  • lib/model/order_placement.dart (5 hints)
  • lib/model/redirect.dart (5 hints)
  • lib/model/setting.dart (5 hints)
  • lib/model/cart_billing_shipping.dart (4 hints)
  • lib/model/product_option.dart (4 hints)
  • lib/model/site.dart (4 hints)
  • lib/model/system_setting.dart (4 hints)
  • lib/api/systemsettings_api.dart (3 hints)
  • lib/api_exception.dart (3 hints)
  • lib/model/cart.dart (3 hints)
  • lib/model/group.dart (3 hints)
  • lib/model/user_password_check.dart (3 hints)
  • lib/model/user_password_set.dart (3 hints)
  • lib/model/user_activation.dart (2 hints)
  • lib/model/user_password_reset.dart (2 hints)
  • lib/model/user_token_check.dart (2 hints)
  • lib/api_helper.dart (1 hint)
  • lib/auth/oauth.dart (1 hint)
  • lib/api.dart (Run dartfmt to format lib/api.dart.)
  • lib/api_client.dart (Run dartfmt to format lib/api_client.dart.)
  • lib/auth/api_key_auth.dart (Run dartfmt to format lib/auth/api_key_auth.dart.)
  • lib/auth/authentication.dart (Run dartfmt to format lib/auth/authentication.dart.)
  • lib/auth/http_basic_auth.dart (Run dartfmt to format lib/auth/http_basic_auth.dart.)

Maintenance issues and suggestions

Provide a file named CHANGELOG.md. (-20 points)

Changelog entries help developers follow the progress of your package. See the example generated by stagehand.

Use analysis_options.yaml. (-10 points)

Change the name of your package's .analysis_options file to analysis_options.yaml.

Read more about the setup of analysis-options.yaml.

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (http).

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 mezzanine_dart_client.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
http >=0.11.1 <0.12.0 0.11.3+17 0.12.0+2
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.12
http_parser 3.1.3
meta 1.1.7
path 1.6.4
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6