0.1.2 • Published 4 years ago

variant_service v0.1.2

Weekly downloads
-
License
Unlicense
Repository
-
Last release
4 years ago

variant_service

VariantService - JavaScript client for variant_service Variant backend service This SDK is automatically generated by the Swagger Codegen project:

  • API version: 0.1.0
  • Package version: 0.1.0
  • Build package: io.swagger.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install variant_service --save
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

Finally, switch to the directory you want to use your variant_service from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('variant_service') in javascript files from the directory you ran the last command above from.

git

If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install GIT_USER_ID/GIT_REPO_ID --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually use this library):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var VariantService = require('variant_service');

var defaultClient = VariantService.ApiClient.instance;

// Configure API key authorization: headerAuthorization
var headerAuthorization = defaultClient.authentications['headerAuthorization'];
headerAuthorization.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//headerAuthorization.apiKeyPrefix['Authorization'] = "Token"

// Configure API key authorization: headerOIDC
var headerOIDC = defaultClient.authentications['headerOIDC'];
headerOIDC.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//headerOIDC.apiKeyPrefix['X-Amzn-Oidc-Data'] = "Token"

var api = new VariantService.AuthApi()

var redirectUrl = "redirectUrl_example"; // {String} 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.authGet(redirectUrl, callback);

Documentation for API Endpoints

All URIs are relative to http://localhost/app/v1

ClassMethodHTTP requestDescription
VariantService.AuthApiauthGetGET /authDo an auth check and redirect to the given url
VariantService.AuthApilogoutGET /logoutLogout
VariantService.CloudfrontApigetCloudfrontCookiesGET /cookies
VariantService.ColorApicreateNewColorPOST /color
VariantService.ColorApideleteColorByIdDELETE /color/{id}
VariantService.ColorApifindColorByFilterGET /color
VariantService.ColorApifindColorByIdGET /color/{id}
VariantService.ColorApiupdateColorByIdPUT /color/{id}
VariantService.HealthApigetLivenessGET /status/aliveLiveness check
VariantService.HealthApigetReadinessGET /status/readyReadiness check
VariantService.InspirationApicreateNewInspirationPOST /inspiration
VariantService.InspirationApideleteInspirationByIdDELETE /inspiration/{id}
VariantService.InspirationApifindInspirationByFilterGET /inspiration
VariantService.InspirationApifindInspirationByIdGET /inspiration/{id}
VariantService.InspirationApiupdateInspirationByIdPUT /inspiration/{id}
VariantService.MaterialApicreateNewMaterialPOST /material
VariantService.MaterialApideleteMaterialByIdDELETE /material/{id}
VariantService.MaterialApifindMaterialByFilterGET /material
VariantService.MaterialApifindMaterialByIdGET /material/{id}
VariantService.MaterialApiupdateMaterialByIdPUT /material/{id}
VariantService.OrganizationApicreateNewOrganizationPOST /organization
VariantService.OrganizationApideleteOrganizationByIdDELETE /organization/{id}
VariantService.OrganizationApifindOrganizationByIdGET /organization/{id}
VariantService.OrganizationApifindOrganizationPlansGET /organization/stripe/plans
VariantService.OrganizationApifindUserAccessibleOrganizationGET /organization
VariantService.OrganizationApiretrieveOrganizationInvoicesByIdGET /organization/stripe/{id}/invoices
VariantService.OrganizationApiretrieveOrganizationStripeAccountByIdGET /organization/stripe/{id}
VariantService.OrganizationApiretrieveOrganizationSubscriptionByIdGET /organization/stripe/{id}/subscription
VariantService.OrganizationApiupdateOrganizationByIdPUT /organization/{id}
VariantService.OrganizationApiupdateOrganizationStripeAccountByIdPUT /organization/stripe/{id}
VariantService.OrganizationApiupdateOrganizationSubscriptionByIdPUT /organization/stripe/{id}/subscription
VariantService.PantoneApifindAllPantoneBooksGET /pantone/books
VariantService.PantoneApifindPantoneColorsByBookIDGET /pantone/book/{id}/colors
VariantService.PantoneApisyncPantoneColorsGET /pantone/sync
VariantService.ProductApicreateNewProductPOST /product
VariantService.ProductApideleteProductByIdDELETE /product/{id}
VariantService.ProductApifindProductByFilterGET /product
VariantService.ProductApifindProductByIdGET /product/{id}
VariantService.ProductApigetProductIdsGET /product/search
VariantService.ProductApiupdateProductByIdPUT /product/{id}
VariantService.ProductMaterialGroupApicreateNewProductMaterialGroupPOST /product/material_group
VariantService.ProductMaterialGroupApideleteProductMaterialGroupByIdDELETE /product/material_group/{id}
VariantService.ProductMaterialGroupApifindProductMaterialGroupByFilterGET /product/material_group
VariantService.ProductMaterialGroupApifindProductMaterialGroupByIdGET /product/material_group/{id}
VariantService.ProductMaterialGroupApiupdateProductMaterialGroupByIdPUT /product/material_group/{id}
VariantService.ProductVariantSetupGroupApicreateNewProductVariantSetupGroupPOST /product/variant_setup_group
VariantService.ProductVariantSetupGroupApideleteProductVariantSetupGroupByIdDELETE /product/variant_setup_group/{id}
VariantService.ProductVariantSetupGroupApifindProductVariantSetupGroupByFilterGET /product/variant_setup_group
VariantService.ProductVariantSetupGroupApifindProductVariantSetupGroupyIdGET /product/variant_setup_group/{id}
VariantService.ProductVariantSetupGroupApiupdateProductVariantSetupGroupByIdPUT /product/variant_setup_group/{id}
VariantService.UserApicreateNewUserPOST /user
VariantService.UserApideleteUserByIdDELETE /user/{id}
VariantService.UserApifindUserGET /user
VariantService.UserApifindUserByExternalIdGET /user/external_id/{id}
VariantService.UserApifindUserByFilterGET /user/search
VariantService.UserApifindUserByIdGET /user/{id}
VariantService.UserApiupdateUserByIdPUT /user/{id}
VariantService.VariantApicreateNewVariantsPOST /variant
VariantService.VariantApideleteVariantByIdDELETE /variant/{id}
VariantService.VariantApifindVariantByFilterGET /variant
VariantService.VariantApifindVariantByIdGET /variant/{id}
VariantService.VariantApiupdateVariantByIdPUT /variant/{id}
VariantService.WorkspaceApicreateNewWorkspacePOST /workspace
VariantService.WorkspaceApideleteWorkspaceByIdDELETE /workspace/{id}
VariantService.WorkspaceApifindUserAccessibleWorkspacesGET /workspace
VariantService.WorkspaceApifindWorkspaceByIdGET /workspace/{id}
VariantService.WorkspaceApiupdateWorkspaceByIdPUT /workspace/{id}
VariantService.WorkspaceMaterialGroupApicreateNewWorkspaceMaterialGroupPOST /workspace/material_group
VariantService.WorkspaceMaterialGroupApideleteWorkspaceMaterialGroupByIdDELETE /workspace/material_group/{id}
VariantService.WorkspaceMaterialGroupApifindWorkspaceMaterialGroupByFilterGET /workspace/material_group
VariantService.WorkspaceMaterialGroupApifindWorkspaceMaterialGroupByIdGET /workspace/material_group/{id}
VariantService.WorkspaceMaterialGroupApiupdateWorkspaceMaterialGroupByIdPUT /workspace/material_group/{id}

Documentation for Models

Documentation for Authorization

headerAuthorization

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

headerOIDC

  • Type: API key
  • API key parameter name: X-Amzn-Oidc-Data
  • Location: HTTP header