# @fbrc/sdk

A TypeScript SDK client for the api.fabric.so API.

## Usage

First, install the SDK from npm.

```bash
npm install @fbrc/sdk --save
```

Next, try it out.

```ts
import {
  Fabric,
} from '@fbrc/sdk';

async function example() {
  console.log('🚀 Testing @fbrc/sdk SDK...');
  const api = new Fabric({ apiKey: 'YOUR_API_KEY' });

  const body = {
    ...
  } satisfies CreateBookmarkOperationRequest;

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

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

Select a specific delegated workspace 

```ts
import {
  Fabric,
} from '@fbrc/sdk';

// Provide workspace id in class constructor
const api = new Fabric({apiKey: 'YOUR_API_KEY', workspaceId: `xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`});
```

## Documentation

[https://developers.fabric.so/api-reference](https://developers.fabric.so/api-reference)

### Authorization

<a id="ApiKey"></a>
#### ApiKey


- **Type**: API key
- **API key parameter name**: `X-Api-Key`
- **Location**: HTTP header
