/zendesk-requests

Front end client for zendesk

Primary LanguageJavaScript

zendesk-requests

Front end client for zendesk

Documentation

Quickstart example:

const ZendeskRequests = require('@aweber/zendesk-requests');
const requests = new ZendeskRequests('mysubdomain');
const promise = requests.create({
    requester: {
        name: 'Anonymous'
    },
    subject: 'Request subject',
    comment: {
        body: 'This is the body'
    }
});

API

new RequestsClient(subdomain)

Creates a client for the front end.

Param Type Description
subdomain string the subdomain for your account

RequestsClient.create(request) ⇒ Promise.<Object, Error>

Creates an anonymous Zendesk request.

Returns: Promise.<Object, Error> - the zendesk request that was created is resolved by the promise, else it returns an error with the response text as the message

Param Type Description
request Object request object as documented in zendesk