npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

elvanto-api

v1.1.0

Published

API wrapper for use in conjunction with an Elvanto account. This wrapper can be used by developers to develop programs for their own churches using an API Key, or to design integrations to share to other churches using OAuth authentication.

Downloads

14

Readme

Elvanto API Ruby Library

This library is all set to go with version 1 of the Elvanto API.

Installation

The preferred way to install Elvanto for Node.js is to use the npm package manager for Node.js. Simply type the following into a terminal window:

npm install elvanto-api

Authenticating

The Elvanto API supports authentication using either OAuth 2 or an API key.

What is This For?

  • Quick summary This is an API wrapper to use in conjunction with an Elvanto account. This wrapper can be used by developers to develop programs for their own churches, or to design integrations to share to other churches using OAuth authentication.
  • Version 1.1.0

Using OAuth 2

This library provides functionality to help you obtain an Access Token and Refresh token. The first thing your application should do is redirect your user to the Elvanto authorization URL where they will have the opportunity to approve your application to access their Elvanto account. You can get this authorization URL by using the authorizeUrl method, like so:

var elvanto = require('elvanto-node');
var authorizeUrl = elvanto.authorizeUrl(clientId, redirectUri, scope, state);
// Redirect your users to authorizeUrl.

If your user approves your application, they will then be redirected to the redirectUri you specified, which will include a code parameter, and optionally a state parameter in the query string. Your application should implement a handler which can exchange the code passed to it for an access token, using exchangeToken like so:

var elvanto = require('elvanto-node');
elvanto.exchangeToken(clientId, clientSecret, code, redirectUri, callback);
elvanto.configure({accessToken: accessToken});
// Use callback function to get access to access_token, expires_in and refresh_token.

At this point you have an access token and refresh token for your user which you should store somewhere convenient so that your application can look up these values when your user wants to make future Elvanto API calls.

Once you have an access token and refresh token for your user, you can authenticate and make further API calls like so:

var elvanto = require('elvanto-node');
elvanto.refreshToken(refreshToken, callback);
elvanto.configure({accessToken: newAccessToken});
allPeople = elvanto.apiCall("people/getAll", {}, callback);

All OAuth tokens have an expiry time, and can be renewed with a corresponding refresh token. If your access token expires when attempting to make an API call, you will receive an error response, so your code should handle this. Here's an example of how you could do this:

var elvanto = require('elvanto-node');
elvanto.refreshToken(refreshToken, callback);

Using an API key

var elvanto = require('elvanto-node');
elvanto.configure({apiKey: apiKey});
var people = elvanto.apiCall("people/search", {"search": {"firstname": firstname}}, callback);

Documentation

Documentation can be found on the Elvanto API website.

Updates

Follow our Twitter to keep up-to-date with changes in the API.

Support

For bugs with the API Node JS Wrapper please use the Issue Tracker.

For suggestions on the API itself, please post in the forum or contact us via our website.