Skip to content

openapi spec for warranty life with generated clients

Notifications You must be signed in to change notification settings

johnnyiller/warranty_life

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

warranty_life

Generate the api for your language

openapi-generator generate -i api.yaml -g javascript -o ./javascript

Javascript

Then install via:

npm install warranty_life --save

Getting Started

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

var WarrantyLife = require('warranty_life');

var defaultClient = WarrantyLife.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'

var api = new WarrantyLife.CategoriesApi()
var categoryId = "categoryId_example"; // {String} Id for the category you would like to retrieve

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

Promises

if you would like to use the promise client you must instantiate the api with the async client.

var WarrantyLife = require('warranty_life');
var ApiClientSync = require("warranty_life/api_client_async");
var client = new ApiClientSync();

// Configure HTTP basic authorization: basicAuth
var basicAuth = client.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'
var api = new WarrantyLife.CategoriesApi(client)
var categoryId = "94";

api.categoriesCategoryIdGet(categoryId).
  then((d) => console.log(d)).
  catch((e) => console.log(e))

alt ERD

About

openapi spec for warranty life with generated clients

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published