Socket
Socket
Sign inDemoInstall

eva-sdk-js

Package Overview
Dependencies
2
Maintainers
2
Versions
298
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eva-sdk-js

The JavaScript based SDK for the EVA platform


Version published
Weekly downloads
1
decreased by-90.91%
Maintainers
2
Install size
5.55 MB
Created
Weekly downloads
 

Readme

Source

About the EVA JavaScript SDK Build Status

DEPRECATION NOTICE: This SDK is deprecated. Please check out the current EVA SDK

The EVA SDK provides access to the functionality exposed by the EVA API using developer focused methods and classes. It is tightly coupled to the low-level shared definitions exposed by the EVA API. The SDK provides a higher level of abstraction for using the EVA API.

Installing

The SDK is available through both npm:

npm install --save eva-sdk-js

and bower:

bower install --save eva-sdk-js

Basic usage

The SDK needs to be initialised once before it can be used.

var EvaSDK              = require( "eva-sdk-js" );
var applicationId       = 1;
var endPointURL         = "https://eva.newblack.io";
var authenticationToken = "YOURTOKENHERE";

EvaSDK.init( authenticationToken, applicationId, endPointURL );

Once initialised you can start using the classes exposed by the SDK to gain access to data in EVA. As an example the below code retrieves a product from the server.

var product = new EvaSDK.Product( productId );

product.fetch()
.then( function( response )
{
    // Product data is available in the response variable or
    // from the product.data property or product.getData() method
    //
    console.log( "Product data", response );
} )
.catch( function( error )
{
    console.error( "Product retrieval error", error );
} );

You can check the documentation or unit tests for more examples

Developing

Dependencies are installed with npm install and bower install

This SDK uses gulp for its development task. You can run gulp to get a list of available commands and a description of what the task does.

Building the SDK bundle is done with gulp build.

You may need to update the EVA shared definitions files at times. You can run gulp typings to automatically download and install them.

During development you can let gulp watch for file changes and rebuild your bundle using gulp watch.

Releasing

Builds from master branch of the SDK are automatically published to NPM. Versioning is managed by semantic release. The master branch is locked for direct commits. Changed should be collected on develop and once a release is required a pull request on github needs to be made from develop to master. This pull request will be validated using TravisCI before it can be merged for the actual release build.

Documentation

The SDK is documented using typedoc. Once you can successfully build the SDK you can generate it using gulp typedoc.

The documentation can be found in the docs/ folder.

Testing

You can run the unit tests with gulp test

If you want to run a specific unit test you can specify you can do:

gulp test --tests=test/products-spec.js

You can run the tests without building like so:

gulp test --skip-build --tests=test/products-spec.js

Keywords

FAQs

Last updated on 24 Nov 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc