# dfstalk-client

> Client library for DFSTalk

Latest version **0.0.1** (published 2020-02-26) · GPL-3.0-or-later license · 0 weekly downloads

## Install

```sh
npm install dfstalk-client
pnpm add dfstalk-client
yarn add dfstalk-client
bun add dfstalk-client
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2020-02-26 |
| First published | 2020-02-26 |
| Weekly downloads | 0 |
| License | GPL-3.0-or-later |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 35.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Vessels Tech |
| Maintainers | kevindoveton |

## Links

- npm: https://www.npmjs.com/package/dfstalk-client
- Repository: https://github.com/vessels-tech/dfstalk
- Homepage: https://github.com/vessels-tech/dfstalk#readme
- Issues: https://github.com/vessels-tech/dfstalk/issues
- npm.io page: https://npm.io/package/dfstalk-client

## Dependencies (1)

- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.0

## Recent versions

- 0.0.1 (latest) — 2020-02-26

## README

# DFSTalk - Client Library

## Usage

### Installing
```bash
npm install dfstalk-client
```

### Basic Usage
```typescript
import { DFSTalk } from 'dfstalk-client';

async function main() {
  const client = new DFSTalk({
    credentials: {
      username: 'username',
      password: 'password'
    }
  });

  try {
    const response = await client.say(12, 'en_AU', 'male');
    console.log(`Url: ${response.url}, Expiry: ${response.expiry}`)
  } catch (e) {
    // handle errors
  }
}

main();
```

## API

### DFSTalk
```typescript
const client = new DFSTalk({
  url: 'optional - path to self hosted server',
  language: 'optional - default language to return',
  credentials: {
    username: 'username',
    password: 'password'
  }
});
```

### Say
```typescript
const client = new DFSTalk({credentials: { username: 'username', password: 'password' }});
const response = await client.say(103, 'en_AU', 'male');
console.log(response)
// { Url: 'path-to-file', Expiry: Date }
```

### getAvailableLanguages
```typescript
const client = new DFSTalk({credentials: { username: 'username', password: 'password' }});
const response = await client.getAvailableLanguages();
console.log(response)
// ['en_AU_male', 'en_AU_female', ...]
```

---
_Source: https://npm.io/package/dfstalk-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
