New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@aweber/zendesk-requests

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aweber/zendesk-requests

Front end client for zendesk

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
3
Weekly downloads
 
Created
Source

zendesk-requests

Front end client for zendesk

Documentation

Quickstart example:

import ZendeskRequests, { RequestsError } from '@aweber/zendesk-requests';

const requests = new ZendeskRequests('mysubdomain');
const promise = requests.create({
    requester: {
        name: 'Anonymous'
    },
    subject: 'Request subject',
    comment: {
        body: 'This is the body'
    }
});
promise.catch((e) => {
    if(e instanceof RequestsError &&
            e.status === 422 &&
            e.json.error === 'RecordInvalid') {
        // Handle validation error
    } else {
        throw e;
    }
});

API

new RequestsClient(subdomain)

Creates a client for the front end.

ParamTypeDescription
subdomainstringthe 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 throws a RequestsError

ParamTypeDescription
requestObjectrequest object as documented in zendesk

RequestsError

Thrown when a non-successful HTTP status was returned.

KeyDescription
messageResponse body text
statusHTTP status code
jsonResponse body as JSON, or null if not valid JSON

Keywords

FAQs

Package last updated on 10 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc