UNPKG

@nuralogix.ai/dfx-api-client

Version:

DeepAffex API JavaScript Client Library

51 lines (34 loc) 1.46 kB
# 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](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) with [ECMAScript 2022, the 13th edition](https://tc39.es/ecma262/) 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: ![DeepAffex API JavaScript Client Library](client.gif) ### Script tag You can load them from popular CDNs such as `skypack`, `JsDelivr` and `Unpkg`. ```html <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> ```