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

extra-life-node

v0.0.1

Published

Extra-Life API library for node

Downloads

1

Readme

extra-life-node

This is a clone of https://github.com/ammuench/extra-life-api

noed-extra-life is a node module to integrate with the extra-life API, and extends it to provide additional info where possible.

Installation


You can install the repo through NPM

npm i extra-life-node
import { getTeamInfo, getTeamDonations } from 'extra-life-node';
import * as extraLifeAPI from 'extra-life-node';

API


Team & Participant IDs Parameters

Every method on the module will require an individual's 'Participant ID' or a team's 'Team ID'. These can be found by going to your personal profile page or team profile page, and checking the end of the URL:

Participant ID

extra-life.org/index.cfm?fuseaction=donordrive.participant&participantID=[PARTICIPANT ID HERE]

Team ID

extra-life.org/index.cfm?fuseaction=donorDrive.team&teamID=[TEAM ID HERE]

Methods

  • getUserInfo( participantId )

    • Takes participantId as a parameter
    • Returns a basic object of user info

    Returned object

    { 
      displayName: 'Joe Smith',
      fundraisingGoal: 400,
      participantID: 506571,
      teamName: 'My Awesome Team',
      eventName: 'Extra Life 2018',
      avatarImageURL: 'https://assets.donordrive.com/extralife/images/$avatars$/constituent_42BB6E88-C292-13D6-00FFFD8987560FD1538.jpg',
      createdDateUTC: '2018-06-15T19:18:15.77+0000',
      eventID: 539,
      sumDonations: 250,
      teamID: 38961,
      isTeamCaptain: false,
      numDonations: 17,
      donateURL: 'https://www.extra-life.org/index.cfm?fuseaction=donate.participant&participantID=506571',
      teamURL: 'https://www.extra-life.org/index.cfm?fuseaction=donorDrive.team&teamID=38961' 
    }
  • getUserDonations( participantId, limit?, page?)

    • Takes participantId as a parameter. limit and page are optional parameters. Page size is equal to your limit value.
    • Returns information on page and count, and an array of donations, ordered from newest to oldest

    Returned object

    {
      countDonations: 73,
      countPages: 1,
      donations: [
        { 
          displayName: 'Tony Stark',
          message: 'Great job!',
          participantID: 681675,
          amount: 25,
          donorID: '5D4DBFFF-B861-D42E-05E6F2B574189698F',
          avatarImageURL: '//assets.donordrive.com/clients/extralife/img/avatar-constituent-default.gif',
          createdDateUTC: '2018-09-04T04:54:16.953+0000'
        },
      ]
    }
  • getTeamInfo(teamId, fetchRoster?)

    • Takes teamId as a parameter and an optional fetchRoster boolean (defaults to TRUE)
    • Returns a promise that contains an object with the basic team info and it's full roster (if fetchRoster is set to TRUE)
    • Roster returns as array of user objects

    Returned object

    { 
      fundraisingGoal: 50000,
      eventName: 'Extra Life 2018',
      avatarImageURL: 'http://assets.donordrive.com/extralife/images/$event539$/avatar_team_38961.jpg',
      createdDateUTC: '2018-01-20T04:51:25.97+0000',
      eventID: 539,
      sumDonations: 1469,
      teamID: 38961,
      name: 'Extra Life Nerds',
      numDonations: 51,
      teamURL: 'https://www.extra-life.org/index.cfm?fuseaction=donorDrive.team&teamID=38961' },
      members: [
        { displayName: 'Alex Muench',
          fundraisingGoal: 1000,
          participantID: 320706,
          teamName: 'Extra Life Nerds',
          eventName: 'Extra Life 2018',
          avatarImageURL: 'https://assets.donordrive.com/extralife/images/$avatars$/constituent_0C07ECD7-C293-34EB-45A3F7B77F8BA043.jpg',
          createdDateUTC: '2018-09-06T20:14:48.0+0000',
          eventID: 539,
          sumDonations: 0,
          teamID: 38961,
          isTeamCaptain: false,
          numDonations: 0,
          profileURL: 'https://www.extra-life.org/index.cfm?fuseaction=donorDrive.participants&participantID=320706',
          URL: 'https://www.extra-life.org/index.cfm?fuseaction=donorDrive.participant&participantID=320706'
        }
      ]
    }
  • getTeamRoster(teamId)

    • Takes teamId as a parameter
    • Returns information on page and count and an array of team members Returned object
      { 
        countMembers: 73,
        countPages: 1,
        members: [
          { displayName: 'Alex Muench',
            fundraisingGoal: 1000,
            participantID: 320706,
            teamName: 'Extra Life Nerds',
            eventName: 'Extra Life 2018',
            avatarImageURL: 'https://assets.donordrive.com/extralife/images/$avatars$/constituent_0C07ECD7-C293-34EB-45A3F7B77F8BA043.jpg',
            createdDateUTC: '2018-09-06T20:14:48.0+0000',
            eventID: 539,
            sumDonations: 0,
            teamID: 38961,
            isTeamCaptain: false,
            numDonations: 0,
            profileURL: 'https://www.extra-life.org/index.cfm?fuseaction=donorDrive.participants&participantID=320706',
            URL: 'https://www.extra-life.org/index.cfm?fuseaction=donorDrive.participant&participantID=320706'
          }
        ]
      }
  • getTeamDonations( teamId, limit, page )

    • Takes teamId as a parameter. limit and page are optional parameters. Page size is equal to your limit value.
    • Returns information on page and count, and an array of donations given to the team, ordered from newest to oldest
    • NOTE ExtraLife's API includes registrations as donations in this view. Donations of "null" are a user signing up for a team. Donations of 19 (assumedly) are users signing up as a Platinum User.

    Returned object

    {
      countDonations: 73,
      countPages: 1,
      donations: [
        { 
          displayName: 'Joe Smith',
          message: null,
          participantID: 55555,
          amount: 19,
          donorID: 'ASDFF-AB7F-8295-1283655555F38D6D',
          avatarImageURL: '//assets.donordrive.com/extralife/images/$avatars$/constituent_ASDFF-AB7F-8295-1283655555F38D6D.jpg',
          createdDateUTC: '2018-01-22T14:39:04.783+0000',
          teamID: 38961 
        },
        {  
          displayName: 'Joan Smith',
          message: null,
          participantID: 55555,
          amount: 19,
          donorID: 'ASDFF-AB7F-8295-1283655555F38D6D',
          avatarImageURL: '//assets.donordrive.com/extralife/images/$avatars$/constituent_ASDFF-AB7F-8295-1283655555F38D6D.jpg',
          createdDateUTC: '2018-01-20T18:15:20.607+0000',
          teamID: 38961
        },
        { 
          displayName: 'Joey Smith',
          message: null,
          participantID: 55555,
          amount: 19,
          donorID: 'ASDFF-AB7F-8295-1283655555F38D6D',
          avatarImageURL: '//assets.donordrive.com/extralife/images/$avatars$/constituent_ASDFF-AB7F-8295-1283655555F38D6D.jpg',
          createdDateUTC: '2018-01-20T17:47:14.630+0000',
          teamID: 38961 
        }
      ]
    }

License

The MIT License (MIT)