Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

briq-api

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

briq-api

A node client for the Briq API

  • 0.0.10
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
2
Weekly downloads
 
Created
Source

briq-api-node

Node client for the Briq API

Install

In your terminal, type:

$ npm install briq-api --save

Then, in your node application, you can require the module and create a new client instance.

const Briq = require('briq-api').Client;
const briq = new Briq(process.env.BRIQ_ACCESS_TOKEN);

Configuration

The Briq client requires an access token, used to validate and restrict resource access. A token is uniquely bound to a Briq team. If you're building a custom Briq application, you'll find your access token in the application config screen. It is recommended that your token is stored in a safe place and not committed with your source code. If (when?) your application becomes public and is offered on the Marqet (got it?), you will receive an access token for each new install of your app.

const briq = new Briq(process.env.BRIQ_ACCESS_TOKEN);

Usage

The Briq API client is Promise-based. The API surface is pretty narrow. You can do much of the work with only a few methods.

const briq = new Briq(process.env.BRIQ_ACCESS_TOKEN);

return briq.organization('YOUR_ORGANIZATION_NAME').users()
  .then(users => {
    console.log(users);
    return users;
  });

Documentation

The Briq API is documented at https://www.givebriq.com/build (getting started) and https://briq.github.io (detailed documentation).

The following methods are exposed by this API client:

  • .organization(name).info() returns the info about your organization
  • .organization(name).users() returns a list of the users in your organization (paging available)
  • .organization(name).user(username) returns information about a user of your organization
  • .organization(name).transactions() returns a list of the latest transactions in your organization, from most recent to oldest (paging available)
  • .organization(name).transaction(transactionId) returns the details of a transaction
  • .organization(name).createTransaction(transactionObject) creates a new transaction in your organization
  • .organization(name).refundTransaction(transactionId) refunds and deletes a transaction

Keywords

FAQs

Package last updated on 25 Feb 2020

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