@pomelo-io/pomelo-api
v0.6.0
Published
Library to interact with [Pomelo API](https://api.pomelo.io/swagger/index.html)
Downloads
1
Readme
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