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

signup-genius-client

v0.1.3

Published

'NodeJS Signup Genius API Client'

Downloads

3

Readme

signup-genius-client

NodeJS Signup Genius API Client

Installation

npm install signup-genius-client

Usage

Note: You must have a SignUpGenius Pro account and API key to access the API.

'use strict';

const Client = require('signup-genius-client'),
      apiKey = 'YourAPIKey';

const client = new Client(apiKey);

// Promises
client.getAllSignups()
    .then(signups => {
        // Do something with signup data
    })
    .catch(e => {
        // Handle error
    });

// Async/Await
(async () => {

    try{
        const signups = await client.getAllSignups();
        // Do something with signup data
    }
    catch(e){
        // Handle error
    }
})();

SignupGeniusClient Class

Methods

SignupGeniusClient.prototype.getProfile()

client.getProfile()
    .then(profile => {
        // Do something with profile data
    })
    .catch(e => {
        // Handle error
    })

Profile Schema

{
    // Account info
    memberid:   Number,
    firstname:  String,
    lastname:   String,
    issubadmin: Boolean,
    adminfor:   String,
    subscription: {
        ispro:    Boolean,
        prolevel: String
    },

    // Contact info
    email:          String,
    mobilephone:    String,
    workphone:      String,
    homephone:      String,
    preferredphone: String,

    // Location info
    address1: String,
    address2: String,
    city:     String,
    state:    String,
    zipcode:  String
}

SignupGeniusClient.prototype.getAllSignups()

Gets a report of all signups (active and inactive)

client.getAllSignups()
    .then(signups => {
        // Do something with signup data
    })
    .catch(e => {
        // Handle error
    })

All Signups Schema

[
    // Signup
    {
        // General
        signupid:    Number,
        title:       String,
        signupurl:   String,
        contactname: String,

        // Time info
        startdate:       Number, // Unix timestamp
        enddate:         Number, // Unix timestamp
        startdatestring: String,
        enddatestring:   String,
        starttime:       Number,
        endtime:         Number,
        offset:          String,

        // Images
        mainimage: String,
        thumbnail: String,

        // Group info
        groupid: Number,
        group:   String,

        // Slot info
        slotmetrics: {
            totalslots:          Number,
            totalslotsfilled:    Number,
            totalavailableslots: Number,
            percentageavailable: String,
            percentagefilled:    String
        }
    }
]

SignupGeniusClient.prototype.getActiveSignups()

Gets a report of all active signups.

client.getActiveSignups()
    .then(signups => {
        // Do something with signup data
    })
    .catch(e => {
        // Handle error
    })

Active Signups Schema

[
    // Active Signup
    {
        // General
        signupid:    Number,
        title:       String,
        signupurl:   String,
        contactname: String,

        // Time info
        startdate:       Number,
        enddate:         Number,
        startdatestring: String,
        enddatestring:   String,
        starttime:       Number,
        endtime:         Number,

        // Images
        mainimage: String,
        thumbnail: String,

        // Group info
        groupid: Number,
        group:   String,

        // Slot info
        slotmetrics: {
            totalslots:          Number,
            totalslotsfilled:    Number,
            totalavailableslots: Number,
            percentageavailable: String,
            percentagefilled:    String
        }
    }
]

SignupGeniusClient.prototype.getExpiredSignups()

Gets a report of all expired signups.

client.getExpiredSignups()
    .then(signups => {
        // Do something with signup data
    })
    .catch(err => {
        // Handle error
    });

Expired Signups Schema

[
    // Expired Signup
    {
        // General
        signupid:    Number,
        title:       String,
        signupurl:   String,
        contactname: String,

        // Time info
        startdate:       Number,
        enddate:         Number,
        startdatestring: String,
        enddatestring:   String,
        starttime:       Number,
        endtime:         Number,

        // Images
        mainimage: String,
        thumbnail: String,

        // Group info
        groupid: Number,
        group:   String,

        // Slot info
        slotmetrics: {
            totalslots:          Number,
            totalslotsfilled:    Number,
            totalavailableslots: Number,
            percentageavailable: String,
            percentagefilled:    String
        }
    }
]

SignupGeniusClient.prototype.getSignupReport(signupID)

Gets a signup report that includes information about registered (filled) and unfilled slots for a given signup. If you are wanting information about filled slots only, you probably want to use the client.getSignupRegistrants(signupID) method instead.

client.getSignupReport(signupID)
    .then(signups => {
        // Do something with signup data
    })
    .catch(err => {
        // Handle error
    });

Signup Report Schema

Note: The SignUp Genius API documentation indicates that there should also be an array of custom questions sent along with this response. There is a bug in their current API version (v2) that is preventing the customquestions array from being returned, even if the given signup does have custom questions.

// Signup Report (filled and unfilled slots)
[
    {

        // General
        signupid:     Number,
        slotitemid:   Number,
        itemmemberid: Number,
        status:       String,
        item:         String,
        myqty:        Number,

        // Time info
        startdate:       Number,
        enddate:         Number,
        startdatestring: String,
        enddatestring:   String,
        starttime:       Number,
        endtime:         Number,
        offset:          String,
        hastime:         Number, // May not be present for unfilled slots

        // Location info
        location: String,

        // User info
        firstname: String,
        lastname:  String,
        email:     String,
        comment:   String,

        amountpaid: String,

        // Array of custom question responses,
        // does not inlcude questions themselves
        customfields: [
            {
                id:            Number,
                customfieldid: Number,
                value:         String
            }
        ]
    }
]

SignupGeniusClient.prototype.getSignupRegistrants(signupID)

Gets a report of registrants (filled slots) for a given signup.

client.getSignupRegistrants(signupID)
    .then(signups => {
        // Do something with signup data
    })
    .catch(err => {
        // Handle error
    });

Signup Registrants Schema

Note: The SignUp Genius API documentation indicates that there should also be an array of custom questions sent along with this response. There is a bug in their current API version (v2) that is preventing the customquestions array from being returned, even if the given signup does have custom questions.

// Signup Report (filled slots)
[
    {

        // General
        signupid:     Number,
        slotitemid:   Number,
        itemmemberid: Number,
        status:       String,
        item:         String,
        myqty:        Number,

        // Time info
        startdate:       Number,
        enddate:         Number,
        startdatestring: String,
        enddatestring:   String,
        starttime:       Number,
        endtime:         Number,
        offset:          String,
        hastime:         Number,

        // Location info
        location: String,

        // User info
        firstname: String,
        lastname:  String,
        email:     String,
        comment:   String,

        amountpaid: String,

        // Array of custom question responses,
        // does not inlcude questions themselves
        customfields: [
            {
                id:            Number,
                customfieldid: Number,
                value:         String
            }
        ]
    }
]

SignupGeniusClient.prototype.getSlotsAvailable

Gets a report of slots available for a given signup.

client.getSignupRegistrants(signupID)
    .then(signups => {
        // Do something with signup data
    })
    .catch(err => {
        // Handle error
    });

Slots Available Schema

Note: The SignUp Genius API documentation indicates that there should also be an array of custom questions sent along with this response. There is a bug in their current API version (v2) that is preventing the customquestions array from being returned, even if the given signup does have custom questions.

// Signup Report (available slots)
[
    {

        // General
        signupid:     Number,
        slotitemid:   Number,
        itemmemberid: Number,
        status:       String,
        item:         String,
        myqty:        Number,

        // Time info
        startdate:       Number,
        enddate:         Number,
        startdatestring: String,
        enddatestring:   String,
        starttime:       Number,
        endtime:         Number,
        offset:          String,

        // Location info
        location: String,

        // User info
        firstname: String,
        lastname:  String,
        email:     String,
        comment:   String,

        amountpaid: String,

        // Array of custom question responses,
        // does not inlcude questions themselves
        customfields: [
            {
                id:            Number,
                customfieldid: Number,
                value:         String
            }
        ]
    }
]

Information

SignUpGenius API documentation