@dosomething/gateway

3.1.1 • Public • Published

Gateway (JS)

This is a simple JavaScript API client for DoSomething.org service, modeled after the Gateway PHP API client.

Installation

Install your own copy of Gateway JS using npm:

npm install @dosomething/gateway --save

Browser

Include the bundled dist/gateway.js in your page, or require it using a module bundler.

Server

  • Set valid ENV variables in your project. See: .env.example.
  • Require the server module @dosomething/gateway/server.

Usage

/**
 * Browser
 * somefile.js
 */

import { RestApiClient, PhoenixAshes } from '@dosomething/gateway';

console.log(new RestApiClient());
console.log(new PhoenixAshes());


/**
 * Server
 * somefile.js
 */

 const { GatewayClient } = require('@dosomething/gateway/server');

 const gatewayClient = GatewayClient.getNewInstance();

/@dosomething/gateway/

    Package Sidebar

    Install

    npm i @dosomething/gateway

    Weekly Downloads

    22

    Version

    3.1.1

    License

    MIT

    Unpacked Size

    63.9 kB

    Total Files

    33

    Last publish

    Collaborators

    • dosomething-admin
    • dfurnes
    • weerd
    • mendelb