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

attendease

v1.0.1

Published

Official JavaScript/Node SDK for Attendease.

Downloads

45

Readme

attendease-js

Official JavaScript/Node SDK for Attendease.

npm version build status npm downloads dependency status

Installation

Install with bower or npm (recommended).

$ npm install attendease

Getting Started

If in Node or using a CommonJS style loader, simply require the module and initialize a client.

var attendease = require('attendease')
var client = attendease('your-event-subdomain')

If in the browser, attendease-js occupies an Attendease global that you can use to initialize a client.

var client = Attendease('your-event-subdomain')

Overview

All methods on the client object return a promise. A then callback must be chained onto the call in order to then do something with the result.

Authentication

// authenticate as an attendee
client.login({
  email: '[email protected]',
  password: 'password'
}).then(function(response) {
  ...
})

// get user details
client.user().then(function(userDetails) {
  ...
})

// logout
client.logout().then(function() {
  ...
})

Read API

// fetch event details
client.event().then(function(eventDetails) {
  ...
})

// fetch presenters
client.presenters().then(function(presenters) {
  ...
})

// fetch sessions
client.sessions().then(function(sessions) {
  ...
})

// fetch sessions mapped out as instances
client.instances().then(function(instances) {
  ...
})

// fetch rooms
client.rooms().then(function(rooms) {
  ...
})

// fetch venues
client.venues().then(function(venues) {
  ...
})

// fetch filters
client.filters().then(function(filters) {
  ...
})

// fetch schedule statuses
client.scheduleStatuses().then(function(statuses) {
  ...
})

// get status for a particular instance
client.scheduleStatus(instanceId).then(function(status) {
  ...
})

Write API

// like an item
client.like(presenterId, 'presenter').then(function() {
  ...
})

// unlike an item
client.unlike(likeId).then(function() {
  ...
})

// rate an item
client.rate(sessionId, 'session', 4).then(function() {
  ...
})

// schedule an instance
client.schedule(instanceId).then(function() {
  ...
})

// unschedule an instance
client.unschedule(instanceId).then(function() {
  ...
})

// check-in to the event
client.checkin('event').then(function() {
  ...
})

// check-in to a session instance
client.checkin('instance', instanceId).then(function() {
  ...
})

// undo a check-in to the event
client.undoCheckin('event').then(function() {
  ...
})

// undo a check-in to a session instance
client.undoCheckin('instance', instanceId).then(function() {
  ...
})

Caching

If you wish to perform caching on all resources, specify the performCaching option when initializing a client.

var client = attendease('your-event-subdomain', {
  performCaching: true
})

With caching enabled, all subsequent calls to any read API methods will resolve right away with a cached version of the previous request for that resource. Example:

// first call will perform a request and cache the data
client.presenters().then(function(presenters) {
  ...
})

// subsequent calls after will not make a request, will return cached result
client.presenters().then(function(presenters) {
  ...
})

// pass true to the call to make a request and update the cache (sync)
client.presenters(true).then(function(presenters) {
  ...
})

Building and testing

Make sure you install any development dependencies.

npm install

Build the library into ./dist.

npm run build

Or to have webpack watch files for changes and do builds automatically.

npm run watch

And to run the test suite.

npm test