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]
8
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
50
Overall:
Weighted score of the above. [more]
14
Learn more about scoring.

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

  • Dart: 2.6.1
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in libraries.

Health suggestions

Fix lib/api/users_api.dart. (-26.71 points)

Analysis of lib/api/users_api.dart reported 62 hints, including:

line 18 col 12: Unnecessary new keyword.

line 21 col 12: Unnecessary new keyword.

line 34 col 26: Use isNotEmpty instead of length

line 39 col 29: Unnecessary new keyword.

line 42 col 9: DO use curly braces for all flow control structures.

Fix lib/api/carts_api.dart. (-25.23 points)

Analysis of lib/api/carts_api.dart reported 58 hints, including:

line 18 col 12: Unnecessary new keyword.

line 21 col 12: Unnecessary new keyword.

line 34 col 26: Use isNotEmpty instead of length

line 39 col 29: Unnecessary new keyword.

line 42 col 9: DO use curly braces for all flow control structures.

Fix lib/api_client.dart. (-20.19 points)

Analysis of lib/api_client.dart reported 45 hints, including:

line 15 col 16: Unnecessary new keyword.

line 19 col 20: Unnecessary new keyword.

line 20 col 19: Unnecessary new keyword.

line 43 col 18: Unnecessary new keyword.

line 45 col 18: Unnecessary new keyword.

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

Additional issues in the following files:

  • lib/model/order.dart (38 hints)
  • lib/model/category_product_many_to_many_through.dart (35 hints)
  • lib/model/product.dart (35 hints)
  • lib/model/product_product_many_to_many_through.dart (35 hints)
  • lib/api/assignedkeywords_api.dart (34 hints)
  • lib/api/blogcategories_api.dart (34 hints)
  • lib/api/blogposts_api.dart (34 hints)
  • lib/api/cartitems_api.dart (34 hints)
  • lib/api/categories_api.dart (34 hints)
  • lib/api/discountcodes_api.dart (34 hints)
  • lib/api/galleries_api.dart (34 hints)
  • lib/api/galleryimages_api.dart (34 hints)
  • lib/api/groups_api.dart (34 hints)
  • lib/api/orderitems_api.dart (34 hints)
  • lib/api/orders_api.dart (34 hints)
  • lib/api/pages_api.dart (34 hints)
  • lib/api/productimages_api.dart (34 hints)
  • lib/api/productoptions_api.dart (34 hints)
  • lib/api/products_api.dart (34 hints)
  • lib/api/productvariations_api.dart (34 hints)
  • lib/api/ratings_api.dart (34 hints)
  • lib/api/redirects_api.dart (34 hints)
  • lib/api/sales_api.dart (34 hints)
  • lib/api/settings_api.dart (34 hints)
  • lib/api/sites_api.dart (34 hints)
  • lib/api/threadedcomments_api.dart (34 hints)
  • lib/model/order_form.dart (33 hints)
  • lib/model/category.dart (32 hints)
  • lib/model/blog_post.dart (28 hints)
  • lib/model/gallery.dart (28 hints)
  • lib/model/page.dart (26 hints)
  • lib/model/threaded_comment.dart (23 hints)
  • lib/model/product_variation.dart (18 hints)
  • lib/model/discount_code.dart (17 hints)
  • lib/model/user.dart (16 hints)
  • lib/model/cart_item.dart (14 hints)
  • lib/model/sale.dart (13 hints)
  • lib/model/order_item.dart (12 hints)
  • lib/model/rating.dart (11 hints)
  • lib/model/assigned_keyword.dart (10 hints)
  • lib/model/cart_payment.dart (10 hints)
  • lib/model/cart_tax.dart (10 hints)
  • lib/model/gallery_image.dart (10 hints)
  • lib/model/order_placement.dart (10 hints)
  • lib/model/product_image.dart (10 hints)
  • lib/model/blog_category.dart (9 hints)
  • lib/model/cart_billing_shipping.dart (9 hints)
  • lib/model/redirect.dart (9 hints)
  • lib/model/setting.dart (9 hints)
  • lib/model/product_option.dart (8 hints)
  • lib/model/site.dart (8 hints)
  • lib/model/system_setting.dart (8 hints)
  • lib/model/cart.dart (7 hints)
  • lib/model/group.dart (7 hints)
  • lib/model/user_password_check.dart (7 hints)
  • lib/model/user_password_set.dart (7 hints)
  • lib/model/user_activation.dart (6 hints)
  • lib/model/user_password_reset.dart (6 hints)
  • lib/model/user_token_check.dart (6 hints)
  • lib/api/systemsettings_api.dart (5 hints)
  • lib/api_helper.dart (5 hints)
  • lib/api_exception.dart (3 hints)
  • lib/api.dart (1 hint)
  • lib/auth/api_key_auth.dart (1 hint)
  • lib/auth/oauth.dart (1 hint)
  • 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.8
path 1.6.4
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6