# rverbio

> Javascript based SDK for rverb.io feedback

Latest version **0.0.5** (published 2017-09-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install rverbio
pnpm add rverbio
yarn add rverbio
bun add rverbio
```

## 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.5 |
| Published | 2017-09-12 |
| First published | 2017-09-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | rverbio |
| Maintainers | jarlotee |
| Keywords | feedback, rverb.io, rverbio |

## Links

- npm: https://www.npmjs.com/package/rverbio
- Repository: https://github.com/rverbio/javascript-sdk
- Homepage: https://github.com/rverbio/javascript-sdk#readme
- Issues: https://github.com/rverbio/javascript-sdk/issues
- npm.io page: https://npm.io/package/rverbio

## Recent versions

- 0.0.5 (latest) — 2017-09-12
- 0.0.4 — 2017-09-12
- 0.0.3 — 2017-09-05
- 0.0.2 — 2017-09-05

## README

# Rverbio Javascript SDK

The Rverbio Javascript SDK enables you to get feedback from your customers with a few lines of code.

**Features**

Rverbio offers some important customization features, with more to come. If you have requests for other features, never hesitate to contact us at <support@rverb.io>.

* Enable/Disable screenshot
* Add custom data to feedback on the back-end
* Supply user identifiers such as an account ID so you can link a user across channels

**Prerequisites**

Before you can use Rverbio in your app, you must create an account at https://rverb.io, and generate an API Key by adding an application.

If you need to retrieve your API Key later, simply log into https://rverb.io and select the application. The API Key is in the upper right corner of the page.

## Installation

**Browser**
`<script src="//unpkg.com/rverbio@latest/dist/rverbio.js"></script>`

**npm**
`npm install rverbio`

## Usage

```javascript
// setup
var instance = new rverbio({
  apiKey: 'YOUR_API_KEY',
  appVersion: 'YOUR_APP_VERSION'
});

// mount the default feedback form
instance.mountForm('YOUR APP NAME');

// mount the default feedback button
instance.mountButton();

// add custom metadata
instance.mergeContext({
  foo: 'bar'
});

// add/replace custom metadata
instance.mergeContext({
  foo: 'baz',
  bar: 'foo'
});

// add user description
instance.setUserDescription('user name or identifier');
// save user email from profile, prevents asking again later
instance.setUserEmail('email@example.com');

```

## Documentation

### new rverbio(options)
```javascript
{
  // the api key you recevied from rverb.io
  apikey,
  // the version of your application
  appVersion: 'Not Set',
  // toggle for screenshot capture
  disableScreenShots: false
}
```

### rverbio.setUserDescription(description: string)

Sets the user description. Typically a user name, user id or other handle.

This will be persisted across sessions.

### rverbio.setUserEmail(email: string)

A valid email address for the user. Users will not be prompted to enter an email in the feedback form if this value is set.

This will be persisted across sessions.

### rverbio.mergeContext(contextData: object)

This method take a shallow list of key value pairs and stores them. This metadata will automatically be attached to the feedback response.

### rverbio.feedback(comment: string[, feedbackType: string, image: Blob])

*Default* feedbackType is `feedback`

This method can be used to post feedback to rverb.io from a custom form.

You can also set a custom feedback type for use in the admin interface or querying our api.


### rverbio.mountForm([appName: string, className: string])

This method mounts the default feedback form to the DOM.

Setting the appName value allows you to customize the form title to say your app name.

You can optionally set a className for style overrides.

### rverbio.openForm()

This method will open the default feedback form and can be used called from an existing or customized feedback link in your application.

### rverbio.mountButton([className: string])

This method will mount the default feedback button to the DOM.

You can optionally set a className for style overrides.

**Pending Features**

* Redact screenshot

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