0.2.0 • Published 3 years ago

jgreenepack v0.2.0

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

jgreenepack

Jgreenepack - JavaScript client for jgreenepack The Pet Store V1 API generates pets for your convenient access. Generated by SDKeasy.

  • API version: 0.2.0
  • Package version: 0.2.0
  • Build package: io.swagger.codegen.languages.JavascriptClientCodegen For more information, please visit https://cheeser.co

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 jgreenepack --save

git

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

    npm install YOUR_USERNAME/jgreenepack --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):

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 Jgreenepack = require('jgreenepack');

var api = new Jgreenepack.PetsApi()
api.createPets().then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Documentation for API Endpoints

All URIs are relative to http://petstore.swagger.io/v1

ClassMethodHTTP requestDescription
Jgreenepack.PetsApicreatePetsPOST /petsCreate a pet
Jgreenepack.PetsApilistPetsGET /petsList all pets
Jgreenepack.PetsApishowPetByIdGET /pets/{petId}Info for a specific pet

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.