@pomelo-io/pomelo-api
TypeScript icon, indicating that this package has built-in type declarations

0.6.0 • Public • Published

pomelo-api-js

Library to interact with Pomelo API

Quickstart

> npm i @pomelo-io/pomelo-api
import { createClient } from "@pomelo-io/pomelo-api"
const client = createClient( { baseUrl: "https://api.pomelo.io/v1" } );

client.on('users:progress', progress => {
    process.stdout.write('.');
});

// simple get grant request
const grant = await client.getGrant("hotsauce");

// all params - see https://api.pomelo.io/swagger/index.html
const grants = await client.raw().grants.grantsList({
    "state[]": "PUBLISHED",
    contribution_sort_context: "ROUND",
    matching_round_id: 501,
    "matching_round_state[]": "APPROVED"
});

// update auth token
client.setAuthToken("Bearer <your admin token>");

Example

> node example.js

Readme

Keywords

none

Package Sidebar

Install

npm i @pomelo-io/pomelo-api

Weekly Downloads

1

Version

0.6.0

License

ISC

Unpacked Size

285 kB

Total Files

9

Last publish

Collaborators

  • yaroshkvorets