GithubHelp home page GithubHelp logo

usabilla / api-js-node Goto Github PK

View Code? Open in Web Editor NEW
10.0 28.0 3.0 1.9 MB

A JS Node client for Usabilla API

Home Page: http://developers.usabilla.com

License: MIT License

JavaScript 100.00%
node usabilla-api

api-js-node's Introduction

Node client for Usabilla API

CircleCI Coverage Status

The Usabilla API Client for Node.js provides access to the Usabilla database from Node.js applications.

The client has the following features:

  • Getting the buttons / campaigns / widgets / forms as well as the feedback they contain.
  • Querying over the feedback with different parameters.

Authentication

The client uses extensive authentication based on a request signing process. For more information, please see our developers guide.

Getting started

Install node client through npm

$ npm install usabilla-api --save

Usage

An example that displays the number of buttons:

const Usabilla = require('usabilla-api');
const usabilla = new Usabilla('YOUR-ACCESS-KEY', 'YOUR-SECRET-KEY');

usabilla.websites.buttons.get().then((buttons) => {
  console.log('Number of buttons: ', buttons.length);
}).catch((reason) => {
  console.error(reason);
});

See the code in the example folder for more advanced ideas on how to use the client.

Configuration

The client can be configured during instantiation with the following options:

  • protocol (default: https) - The protocol to use when making requests, this will also configure the type of node http client either http or https
  • host (default: data.usabilla.com) - The host to use when making requests
  • port (default: null) - The port to use when making requests
  • iterator (default: true) - Whether to iterate until all results are retrieved

For example:

const Usabilla = require('usabilla-api');
const options = {
  protocol: 'http',
  host: 'proxy-host',
  port: 'proxy-port'
}
const usabilla = new Usabilla('YOUR-ACCESS-KEY', 'YOUR-SECRET-KEY', options);

// usabilla.websites.buttons.get()

Returned errors

In case of an error, the library throws an error object with the following properties:

  • type - The type of error, usually Sender.
  • code - A machine readable code of the error as defined in the guide.
  • message - Human readable format of the error.
  • status - The HTTP status of the response.

Support

The Usabilla Node.js Client API is maintained by Usabilla Development Team. Everyone is encouraged to file bug reports, feature requests, and pull requests through GitHub. This input is critical and will be carefully considered, but we can’t promise a specific resolution or time frame for any request. For more information please email our Support Team at [email protected].

api-js-node's People

Contributors

dependabot[bot] avatar rdohms avatar shuisman avatar spirosikmd avatar yevgeniyvaleyev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

api-js-node's Issues

Why iterator isn't a param configurable?

I don't understand the iterator parameter in the index.js file. There are no references in the documentation.
However, this parameter causes my API searches lose their search parameters after the first iteration. Especially when I want to request the last 10 (or n) feedbacks. Only the first iteration sends the correct parameters, then the default parameters are sent and not those that I sent.

src/index.js : constructor()

this.config = {
  method: 'GET',
  host: 'data.usabilla.com',
  iterator: true // THIS ... ¿WHY?
};

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


The push permission to the Git repository is required.

semantic-release cannot push the version tag to the branch master on remote Git repository with URL https://github.com/usabilla/api-js-node.

Please refer to the authentication configuration documentation to configure the Git credentials on your CI environment and make sure the repositoryUrl is configured with a valid Git URL.


Good luck with your project ✨

Your semantic-release bot 📦🚀

Client does not work - problem with signature

Using the client as per README throws error:

Error: The request signature we calculated does not match the signature you provided. Check your Usabilla Secret Key and signing method. Consult the service documentation for details.

Cannot debug because it uses the minified version

Auto-release is broken

We need to fix auto-releasing.

  • GHA support was added in v16 of semantic-release
  • v16 and the following versions require newer node releases: v10 for v16 and v16 for v19.

We need to plan this work and couple it with some house cleaning.

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


The push permission to the Git repository is required.

semantic-release cannot push the version tag to the branch master on remote Git repository with URL https://github.com/usabilla/api-js-node.

Please refer to the authentication configuration documentation to configure the Git credentials on your CI environment and make sure the repositoryUrl is configured with a valid Git URL.


Good luck with your project ✨

Your semantic-release bot 📦🚀

Issues connecting behind a corporate proxy

We are having issues getting this package to work with our enterprise proxy settings, is it possible to configure the https get method in resource.js to accept proxy settings?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.