1.1.6 • Published 2 years ago

@launchnotes/moments-api-client v1.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Moments API Client

Client that allows you to interface with LaunchNotes' Moments API.

Installing the client

# via yarn
yarn add @launchnotes/moments-api-client
# via npm
npm i @launchnotes/moments-api-client

Using the client to create Moments

The client is based off of OpenAPI's typescript-axios generator. You will first have to create a Configuration instance with your API key and create a MomentsApi instance with that config.

From there, you should be able to make POST requests to the Moments API using MomentsApi.postMoments().

import {
  MomentsApi,
  PostMomentsRequest,
  Configuration,
} from '@launchnotes/moments-api-client';

const config = new Configuration({
  accessToken: 'manage_abc123',
  basePath: 'https://pathtoapi.local:8080',
})
const api = new MomentsApi(config);
const request: PostMomentsRequest = {
  schemaId: 'https://schema.launchnotes.dev/schemas/test.json',
  projectId: 'pro_abc123',
  data: {},
};

const response = api.postMoments(request).then((result) => {
  console.log(result);
}).catch((error) => {
  console.log(error);
});

OpenAPI generator and Axios

The client was generated by OpenAPI's typescript-axios generator using an OpenAPI spec YAML file. For more information, please refer to these articles:

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.2

2 years ago

1.1.0

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago