@whizzes/linx
Version:
API Client for Linx
50 lines (34 loc) • 954 B
Markdown
<div>
<h1 align="center">Linx</h1>
<h4 align="center">API Client for Linx</h4>
</div>
> Still under early development. The underlying server is available on [whizzes/linx][1].
```bash
npm install @whizzes/linx
```
```typescript
import { Client } from '@whizzes/linx/browser';
import type { Linx } from '@whizzes/linx/browser';
// The URL where Linx is hosted
const linxServer = 'http://localhost:3000';
// Create a Client instance
const linx = new Client(linxServer);
let url = '';
let error = null;
let link: Linx.Link | null = null;
async function createLink(): Promise<void> {
try {
link = await linx.new(url);
} catch (err) {
error = err.toString();
}
}
```
Every contribution to this project is welcome, feel free to open PRs and issues
if you find fit for any.
Licensed under the MIT license. Refer to the `LICENSE` file.
[]: https://github.com/whizzes/linx