useshortcut / shortcut-client-js

The official JavaScript client library for the Shortcut (formerly Clubhouse) REST API.
https://useshortcut.github.io/shortcut-client-js/
133 stars 31 forks source link

Rewrite into a generated client from Swagger schema #127

Closed charpeni closed 3 years ago

charpeni commented 3 years ago

Related to #126.

This is a complete rewrite of this library into a generated client (swagger-typescript-api) from our Swagger schema.

⚠️ Breaking changes expected.

Usage example:

import { ShortcutApi } from '@useshortcut/client';

const shortcut = new ShortcutApi(process.env.SHORTCUT_API_TOKEN); // See https://github.com/useshortcut/shortcut-client-js#how-to-get-an-api-token

shortcut.getCurrentMemberInfo().then((response) => console.log(response?.data));

Further usage examples are available in /examples.

TODO after merge

charpeni commented 3 years ago

Tagging some contributors/consumers to gather feedback before we release this.

cc @andjosh @j-martin @adamazing @mikabytes @steaks @MattieTK @yordis. Any thoughts?

j-martin commented 3 years ago

Looks fine. I am glad you guys finally have an OpenAPI spec (or I am just out of the loop).