Skip to content

bmlt-enabled/bmlt-server-semantic-typescript-client

Repository files navigation

bmlt-server-semantic-client@1.0.0

A TypeScript SDK client for the BMLT Semantic API.

Usage

First, install the SDK from npm.

npm install bmlt-server-semantic-client --save

Next, try it out.

import {
  Configuration,
  FieldsApi,
} from 'bmlt-server-semantic-client';
import type { GetFieldKeysRequest } from 'bmlt-server-semantic-client';

async function example() {
  console.log("🚀 Testing bmlt-server-semantic-client SDK...");
  const api = new FieldsApi();

  try {
    const data = await api.getFieldKeys();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

// Run the test
example().catch(console.error);

Configure the server URL

By default, requests target http://localhost:8000/main_server (the server URL baked into the spec). To point the client at a different BMLT server, pass a Configuration with basePath:

import { Configuration, FieldsApi } from 'bmlt-server-semantic-client';

const config = new Configuration({
  basePath: 'https://your-bmlt-server.example.org/main_server',
});

const api = new FieldsApi(config);

basePath should point at the server's /main_server root — each operation appends its own /client_interface/json/?switcher=... path. Configuration also accepts fetchApi, headers, middleware, and credentials; see ConfigurationParameters in src/runtime.ts for the full list.

Documentation

API Endpoints

All URIs are relative to http://localhost:8000/main_server

Class Method HTTP request Description
FieldsApi getFieldKeys GET /client_interface/json/?switcher=GetFieldKeys Get all available field keys
FieldsApi getFieldValues GET /client_interface/json/?switcher=GetFieldValues Get distinct values for a field
FormatsApi getSemanticFormats GET /client_interface/json/?switcher=GetFormats Get meeting formats
MeetingsApi getChanges GET /client_interface/json/?switcher=GetChanges Get meeting changes within a date range
MeetingsApi getSearchResults GET /client_interface/json/?switcher=GetSearchResults Search for meetings
ServerApi getCoverageArea GET /client_interface/json/?switcher=GetCoverageArea Get the geographic coverage bounding box for this server
ServerApi getSemanticServerInfo GET /client_interface/json/?switcher=GetServerInfo Get server information
ServiceBodiesApi getSemanticServiceBodies GET /client_interface/json/?switcher=GetServiceBodies Get service bodies

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: 1.0.0
  • Package version: 1.0.0
  • Generator version: 7.23.0-SNAPSHOT
  • 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 build

Publishing

Once you've built the package, you can publish it to npm:

npm publish

License

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors