Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including @code.gov/code-gov-integrations with all npm packages installed. Try it out:

var codeGovIntegrations = require("@code.gov/code-gov-integrations")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@code.gov/code-gov-integrations v1.1.1

Package for third party integrations being used by code.gov and its projects

Code.gov Integrations

CircleCI Maintainability Test Coverage

Small module to house Code.gov integrations with third party services.

How to use this module

All integrations found in the libs folder are accesible when requiring this package.

const { github } = require('@code.gov/code-gov-integrations');

const githubClientParams = {
    type: 'token',
    token: '[your-gh-token]'
};
const client = github.getClient(githubClientParams)

github.getData('gsa', 'code-gov-integrations', client)
    .then(data => console.log(data))
    .catch(error => console.error(error));

For more examples take a looks at our examples folder.

How to add a module / integration

All you have to do is add a folder with an index.js file that exports your integration's API. The folder name will the the name used to export the integration.

libs
  |- new_integration
    |- index.js

The included integration(s) export an object with a getData function. We recomend following the same pattern with your integrations.

Contributing integrations to this module must follow the pattern mentioned for it to be considered for inclusion.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free