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

@culturehq/client

Package Overview
Dependencies
Maintainers
1
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@culturehq/client

A JavaScript client that wraps the CultureHQ API

  • 5.0.3
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@culturehq/client

Build Status

A JavaScript client that wraps the CultureHQ API.

Getting started

Import the package into your node application like:

import client from "@culturehq/client";

Every API call function returns a Promise. You can call them using normal Promise semantics, as in below:

const getProfile = () => {
  client.getProfile().then(response => {
    console.log(response);
  }).catch(error => {
    console.error(error);
  });
};

or you can use async/await syntax, as in below:

const getProfile = async () => {
  try {
    const response = await client.getProfile();
    console.log(response);
  } catch (error) {
    console.error(error);
  }
};

Each function can be introspected to determine its expected parameters (expectedParams) and optional parameters (optionalParams), as in:

const { expectedParams, optionalParams } = client.createEvent;

If a function has multipart set on its config, it's because one or more of the attributes require a file object. In this case, a File object should be given for the value, as in:

const avatar = document.querySelector("#avatar").files[0];
const response = await client.updateUser({ userId: 12345, avatar });

Development

First, install the dependencies with yarn.

Styling

Styling is handled through prettier. Run it with yarn prettier.

Testing

Run yarn test to run the tests with jest.

FAQs

Package last updated on 13 Aug 2018

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