1.6.0 • Published 6 years ago

insights_hsdm_api v1.6.0

Weekly downloads
-
License
Apache 2.0
Repository
-
Last release
6 years ago

insights_hsdm_api

InsightsHsdmApi - JavaScript client for insights_hsdm_api This is a API to fetch and order catalog items from different cloud sources This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.6.0
  • Package version: 1.6.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 insights_hsdm_api --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 insights_hsdm_api from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

You should now be able to require('insights_hsdm_api') 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/YOUR_USERNAME/insights_hsdm_api then install it via:

    npm install YOUR_USERNAME/insights_hsdm_api --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 InsightsHsdmApi = require('insights_hsdm_api');

var defaultClient = InsightsHsdmApi.ApiClient.instance;

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

var api = new InsightsHsdmApi.UsersApi()

var body = new InsightsHsdmApi.Provider(); // {Provider} 

api.addProvider(body).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Documentation for API Endpoints

All URIs are relative to https://virtserver.swaggerhub.com/mkanoor/InsightsCatalog/1.0.0

ClassMethodHTTP requestDescription
InsightsHsdmApi.UsersApiaddProviderPOST /providersTemporary API to add a new provider
InsightsHsdmApi.UsersApiaddToOrderPOST /orders/{order_id}/itemsAdd a Catalog to the Order in Pending State
InsightsHsdmApi.UsersApicatalogItemsGET /catalog_itemsfetches catalog items from all providers
InsightsHsdmApi.UsersApifetchCatalogItemWithProviderGET /providers/{provider_id}/catalog_itemsFetch all or a specific catalog item from a specific provider
InsightsHsdmApi.UsersApifetchCatalogItemWithProviderAndCatalogIDGET /providers/{provider_id}/catalog_items/{catalog_id}Fetches a specific catalog item for a provider
InsightsHsdmApi.UsersApilistOrderItemGET /orders/{order_id}/items/{order_item_id}Get an individual item from a given order
InsightsHsdmApi.UsersApilistOrderItemsGET /orders/{order_id}/itemsGet a list of items in a given order
InsightsHsdmApi.UsersApilistOrdersGET /ordersGet a list of orders
InsightsHsdmApi.UsersApilistProgressMessagesGET /order_items/{order_item_id}/progress_messagesGet a list of progress messages in an item
InsightsHsdmApi.UsersApilistProvidersGET /providersTemporary API to list provider
InsightsHsdmApi.UsersApinewOrderPOST /ordersCreate a new order
InsightsHsdmApi.UsersApiplanParametersGET /providers/{provider_id}/catalog_items/{catalog_id}/catalog_plans/{plan_id}/parametersFetches plan parameters, it needs the provider id, the catalog_id and plan_id
InsightsHsdmApi.UsersApisearchPlansGET /providers/{provider_id}/catalog_items/{catalog_id}/catalog_planssearches avaliable plans for a catalog item
InsightsHsdmApi.UsersApisubmitOrderPOST /orders/{order_id}Submit the given order

Documentation for Models

Documentation for Authorization

UserSecurity

  • Type: HTTP basic authentication
1.6.0

6 years ago

1.5.0

6 years ago

1.4.0

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.0

6 years ago