README
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
Node.js
Fornpm
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
https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:
If the library is hosted at a git repository, e.g. 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
Class | Method | HTTP request | Description |
---|---|---|---|
VariantService.AuthApi | authGet | GET /auth | Do an auth check and redirect to the given url |
VariantService.AuthApi | logout | GET /logout | Logout |
VariantService.CloudfrontApi | getCloudfrontCookies | GET /cookies | |
VariantService.ColorApi | createNewColor | POST /color | |
VariantService.ColorApi | deleteColorById | DELETE /color/{id} | |
VariantService.ColorApi | findColorByFilter | GET /color | |
VariantService.ColorApi | findColorById | GET /color/{id} | |
VariantService.ColorApi | updateColorById | PUT /color/{id} | |
VariantService.HealthApi | getLiveness | GET /status/alive | Liveness check |
VariantService.HealthApi | getReadiness | GET /status/ready | Readiness check |
VariantService.InspirationApi | createNewInspiration | POST /inspiration | |
VariantService.InspirationApi | deleteInspirationById | DELETE /inspiration/{id} | |
VariantService.InspirationApi | findInspirationByFilter | GET /inspiration | |
VariantService.InspirationApi | findInspirationById | GET /inspiration/{id} | |
VariantService.InspirationApi | updateInspirationById | PUT /inspiration/{id} | |
VariantService.MaterialApi | createNewMaterial | POST /material | |
VariantService.MaterialApi | deleteMaterialById | DELETE /material/{id} | |
VariantService.MaterialApi | findMaterialByFilter | GET /material | |
VariantService.MaterialApi | findMaterialById | GET /material/{id} | |
VariantService.MaterialApi | updateMaterialById | PUT /material/{id} | |
VariantService.OrganizationApi | createNewOrganization | POST /organization | |
VariantService.OrganizationApi | deleteOrganizationById | DELETE /organization/{id} | |
VariantService.OrganizationApi | findOrganizationById | GET /organization/{id} | |
VariantService.OrganizationApi | findOrganizationPlans | GET /organization/stripe/plans | |
VariantService.OrganizationApi | findUserAccessibleOrganization | GET /organization | |
VariantService.OrganizationApi | retrieveOrganizationInvoicesById | GET /organization/stripe/{id}/invoices | |
VariantService.OrganizationApi | retrieveOrganizationStripeAccountById | GET /organization/stripe/{id} | |
VariantService.OrganizationApi | retrieveOrganizationSubscriptionById | GET /organization/stripe/{id}/subscription | |
VariantService.OrganizationApi | updateOrganizationById | PUT /organization/{id} | |
VariantService.OrganizationApi | updateOrganizationStripeAccountById | PUT /organization/stripe/{id} | |
VariantService.OrganizationApi | updateOrganizationSubscriptionById | PUT /organization/stripe/{id}/subscription | |
VariantService.PantoneApi | findAllPantoneBooks | GET /pantone/books | |
VariantService.PantoneApi | findPantoneColorsByBookID | GET /pantone/book/{id}/colors | |
VariantService.PantoneApi | syncPantoneColors | GET /pantone/sync | |
VariantService.ProductApi | createNewProduct | POST /product | |
VariantService.ProductApi | deleteProductById | DELETE /product/{id} | |
VariantService.ProductApi | findProductByFilter | GET /product | |
VariantService.ProductApi | findProductById | GET /product/{id} | |
VariantService.ProductApi | getProductIds | GET /product/search | |
VariantService.ProductApi | updateProductById | PUT /product/{id} | |
VariantService.ProductMaterialGroupApi | createNewProductMaterialGroup | POST /product/material_group | |
VariantService.ProductMaterialGroupApi | deleteProductMaterialGroupById | DELETE /product/material_group/{id} | |
VariantService.ProductMaterialGroupApi | findProductMaterialGroupByFilter | GET /product/material_group | |
VariantService.ProductMaterialGroupApi | findProductMaterialGroupById | GET /product/material_group/{id} | |
VariantService.ProductMaterialGroupApi | updateProductMaterialGroupById | PUT /product/material_group/{id} | |
VariantService.ProductVariantSetupGroupApi | createNewProductVariantSetupGroup | POST /product/variant_setup_group | |
VariantService.ProductVariantSetupGroupApi | deleteProductVariantSetupGroupById | DELETE /product/variant_setup_group/{id} | |
VariantService.ProductVariantSetupGroupApi | findProductVariantSetupGroupByFilter | GET /product/variant_setup_group | |
VariantService.ProductVariantSetupGroupApi | findProductVariantSetupGroupyId | GET /product/variant_setup_group/{id} | |
VariantService.ProductVariantSetupGroupApi | updateProductVariantSetupGroupById | PUT /product/variant_setup_group/{id} | |
VariantService.UserApi | createNewUser | POST /user | |
VariantService.UserApi | deleteUserById | DELETE /user/{id} | |
VariantService.UserApi | findUser | GET /user | |
VariantService.UserApi | findUserByExternalId | GET /user/external_id/{id} | |
VariantService.UserApi | findUserByFilter | GET /user/search | |
VariantService.UserApi | findUserById | GET /user/{id} | |
VariantService.UserApi | updateUserById | PUT /user/{id} | |
VariantService.VariantApi | createNewVariants | POST /variant | |
VariantService.VariantApi | deleteVariantById | DELETE /variant/{id} | |
VariantService.VariantApi | findVariantByFilter | GET /variant | |
VariantService.VariantApi | findVariantById | GET /variant/{id} | |
VariantService.VariantApi | updateVariantById | PUT /variant/{id} | |
VariantService.WorkspaceApi | createNewWorkspace | POST /workspace | |
VariantService.WorkspaceApi | deleteWorkspaceById | DELETE /workspace/{id} | |
VariantService.WorkspaceApi | findUserAccessibleWorkspaces | GET /workspace | |
VariantService.WorkspaceApi | findWorkspaceById | GET /workspace/{id} | |
VariantService.WorkspaceApi | updateWorkspaceById | PUT /workspace/{id} | |
VariantService.WorkspaceMaterialGroupApi | createNewWorkspaceMaterialGroup | POST /workspace/material_group | |
VariantService.WorkspaceMaterialGroupApi | deleteWorkspaceMaterialGroupById | DELETE /workspace/material_group/{id} | |
VariantService.WorkspaceMaterialGroupApi | findWorkspaceMaterialGroupByFilter | GET /workspace/material_group | |
VariantService.WorkspaceMaterialGroupApi | findWorkspaceMaterialGroupById | GET /workspace/material_group/{id} | |
VariantService.WorkspaceMaterialGroupApi | updateWorkspaceMaterialGroupById | PUT /workspace/material_group/{id} |
Documentation for Models
- VariantService.Color
- VariantService.ColorSearchResult
- VariantService.ColorUpdate
- VariantService.ErrorResponse
- VariantService.Expiry
- VariantService.GuestOrganization
- VariantService.Image
- VariantService.Inspiration
- VariantService.InspirationSearchResult
- VariantService.Material
- VariantService.MaterialSearchResult
- VariantService.MaterialUpdate
- VariantService.Organization
- VariantService.OrganizationInvoice
- VariantService.OrganizationInvoices
- VariantService.OrganizationPlan
- VariantService.OrganizationPlans
- VariantService.OrganizationStripeAccount
- VariantService.OrganizationSubscription
- VariantService.PantoneBook
- VariantService.PantoneBookSearchResult
- VariantService.PantoneColor
- VariantService.PantoneColorSearchResult
- VariantService.Principal
- VariantService.Product
- VariantService.ProductIDItem
- VariantService.ProductIdSearchResult
- VariantService.ProductMaterialGroup
- VariantService.ProductMaterialGroupSearchResult
- VariantService.ProductMaterialGroupUpdate
- VariantService.ProductSearchResult
- VariantService.ProductUpdate
- VariantService.ProductVariantSetupGroup
- VariantService.ProductVariantSetupGroupSearchResult
- VariantService.ProductVariantSetupGroupUpdate
- VariantService.RenderJob
- VariantService.User
- VariantService.UserSearchResult
- VariantService.Variant
- VariantService.VariantSearchResult
- VariantService.VariantUpdate
- VariantService.Variants
- VariantService.Workspace
- VariantService.WorkspaceMaterialGroup
- VariantService.WorkspaceMaterialGroupSearchResult
- VariantService.WorkspaceMaterialGroupUpdate
- VariantService.WorkspaceSearchResult
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