DeepAffex™ Cloud API JavaScript Client Library
Description
The DeepAffex™ Cloud API JavaScript Client Library is designed for JavaScript client-application developers. It offers simple, flexible access to many DeepAffex APIs.
Installation
The main way that we ship our DeepAffex™ Cloud API code to NPM is as ECMAScript modules with ECMAScript 2022, the 13th edition syntax. This allows developers to take advantage of modern JavaScript features and have greater control over what they ship to their end users.
You can use either of the following methods to add the library to your project:
Package managers
# yarn
yarn add @nuralogix.ai/dfx-api-client
# npm
npm install @nuralogix.ai/dfx-api-client
Once added, then you can use it like this:
Script tag
You can load them from popular CDNs such as skypack
, JsDelivr
and Unpkg
.
<html>
<body>
<script type="module">
import client from 'https://cdn.skypack.dev/@nuralogix.ai/dfx-api-client@1.0.0';
const apiClient = client();
const response = await apiClient.http.general.status();
const { status, body } = response;
if (status === '200') console.log(body.Version);
</script>
</body>
</html>