@ska-ter/client
v3.1.1
Published
Auto-generated public-tier TypeScript client for the SKA Core API (release 3.1.1).
Readme
@ska-ter/[email protected]
A TypeScript SDK client for the localhost API.
Usage
First, install the SDK from npm.
npm install @ska-ter/client --saveNext, try it out.
import {
Configuration,
DefaultApi,
} from '@ska-ter/client';
import type { GetAtomRequest } from '@ska-ter/client';
async function example() {
console.log("🚀 Testing @ska-ter/client SDK...");
const api = new DefaultApi();
const body = {
// string | The atom\'s canonical URI under the SKA v3 namespace (https://ontology.semantic-knowledge-atoms.com/ska/v3/…).
uri: uri_example,
} satisfies GetAtomRequest;
try {
const data = await api.getAtom(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);Documentation
API Endpoints
All URIs are relative to http://localhost
| Class | Method | HTTP request | Description | ----- | ------ | ------------ | ------------- DefaultApi | getAtom | GET /v3/atoms/{uri} | Retrieve a Semantic Knowledge Atom by its canonical URI.
Models
Authorization
Endpoints do not require authorization.
About
This TypeScript SDK client supports the Fetch API and is automatically generated by the OpenAPI Generator project:
- API version:
0.1.0 - Package version:
3.1.1 - Generator version:
7.24.0 - Build package:
org.openapitools.codegen.languages.TypeScriptFetchClientCodegen
The generated npm module supports the following:
- Environments
- Node.js
- Webpack
- Browserify
- Language levels
- ES5 - you must have a Promises/A+ library installed
- ES6
- Module systems
- CommonJS
- ES6 module system
Development
Building
To build the TypeScript source code, you need to have Node.js and npm installed. After cloning the repository, navigate to the project directory and run:
npm install
npm run buildPublishing
Once you've built the package, you can publish it to npm:
npm publish