# qualtive-node

> Client library for Qualtive.

Latest version **1.0.0** (published 2021-03-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install qualtive-node
pnpm add qualtive-node
yarn add qualtive-node
bun add qualtive-node
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2021-03-12 |
| First published | 2021-03-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 12.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Qualtive |
| Maintainers | qualtive |

## Links

- npm: https://www.npmjs.com/package/qualtive-node
- Repository: https://github.com/nightshift-habits/qualtive-client-node
- Homepage: https://github.com/nightshift-habits/qualtive-client-node#readme
- Issues: https://github.com/nightshift-habits/qualtive-client-node/issues
- npm.io page: https://npm.io/package/qualtive-node

## Recent versions

- 1.0.0 (latest) — 2021-03-12

## README

# Qualtive Client Library for Node

## Installation

### Using `npm`

```
npm install qualtive-node
```

### Using `yarn`

```
yarn add qualtive-node
```

TypeScript types are included in this package.

## Usage

First of all, make sure you have created a question on [qualtive.io](https://qualtive.io). Each feedback entry is posted to a so called collection (ID) which can be found in the question page.

### Posting feedback

To post a feedback entry, use the `post`-function. For example:

```typescript
import * as qualtive from "qualtive-node"

qualtive.post("my-company/my-question", {
  score: 75, // Score between 0 and 100 where 0 is saddest and 100 is happiest.
  text: "Hello world!", // Optional user typed text.
  user: {
    clientId: "34851e75-de80-4f5b-9dbe-89dbd8295089", // Uniq identifier for the client the feedback was sent from.
  },
})
```

If users can login on your site, you can include a user property describing the user. For example:

```typescript
import * as qualtive from "qualtive-node"

qualtive.post("my-company/my-question", {
  score: 75,
  user: {
    clientId: "34851e75-de80-4f5b-9dbe-89dbd8295089",
    id: "user-123", // Authorized user id. Used to list feedback from the same user. Optional.
    name: "Steve", // User friendly name. Can be the users full name or alias. Optional.
    email: "steve@gmail.com", // Reachable email adress. Optional.
  },
})
```

You can even include custom attributes that will be shown on [qualtive.io](https://qualtive.io). For example:

```typescript
import * as qualtive from "qualtive-node"

qualtive.post("my-company/my-question", {
  score: 75,
  user: {
    clientId: "34851e75-de80-4f5b-9dbe-89dbd8295089",
  },
  customAttributes: {
    age: 22,
  },
})
```

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