1.0.3 • Published 12 months ago

ncloud-cloudfunctions v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

api

Api - JavaScript client for api Cloud Functions Open APIhttps://cloudfunctions.apigw.ntruss.com/api/v2 This SDK is automatically generated by the Swagger Codegen project:

  • API version: 2022-08-18T08:02:31Z
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.NcpJavascriptForNcloudClientCodegen

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

git

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

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

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 Api = require('api');

var defaultClient = Api.ApiClient.instance;

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

var api = new Api.V2Api()

var packageName = "packageName_example"; // {String} packageName

var actionName = "actionName_example"; // {String} actionName

var opts = { 
  'platform': "platform_example" // {String} platform
};
api.deleteAction(packageName, actionName, opts).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Documentation for API Endpoints

All URIs are relative to https://cloudfunctions.apigw.ntruss.com/api/v2

ClassMethodHTTP requestDescription
Api.V2ApideleteActionDELETE /packages/{packageName}/actions/{actionName}
Api.V2ApideletePackageDELETE /packages/{packageName}
Api.V2ApideleteTriggerDELETE /triggers/{triggerName}
Api.V2ApideleteTriggerLinkActionDELETE /triggers/{triggerName}/link-action
Api.V2ApigetActionGET /packages/{packageName}/actions/{actionName}
Api.V2ApigetActionActivationDetailGET /packages/{packageName}/actions/{actionName}/activations/{activationId}
Api.V2ApigetActionActivationListGET /packages/{packageName}/actions/{actionName}/activations
Api.V2ApigetActionListGET /packages/{packageName}/actions
Api.V2ApigetActivationListGET /activations
Api.V2ApigetPackageGET /packages/{packageName}
Api.V2ApigetPackageListGET /packages
Api.V2ApigetTriggerGET /triggers/{triggerName}
Api.V2ApigetTriggerActivationDetailGET /triggers/{triggerName}/activations/{activationId}
Api.V2ApigetTriggerActivationListGET /triggers/{triggerName}/activations
Api.V2ApigetTriggerListGET /triggers
Api.V2ApipostActionPOST /packages/{packageName}/actions/{actionName}
Api.V2ApipostActionExternalLinkPOST /packages/{packageName}/actions/{actionName}/external-link-url
Api.V2ApipostTriggerPOST /triggers/{triggerName}
Api.V2ApipostTriggerExternalLinkPOST /triggers/{triggerName}/external-link-url
Api.V2ApipostTriggerLinkActionPOST /triggers/{triggerName}/link-action
Api.V2ApiputActionPUT /packages/{packageName}/actions/{actionName}
Api.V2ApiputPackagePUT /packages/{packageName}

Documentation for Models

Documentation for Authorization

x-ncp-iam

  • Type: API key
  • API key parameter name: x-ncp-iam
  • Location: HTTP header