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

eventful-node

v1.1.1

Published

super thin eventful client api library

Downloads

93

Readme

eventful-node

BuildStatus

A simple client library for the Eventful API for event searching. (http://api.eventful.com). This library is a very limited subset of the Eventful API and does not include any authenitcation-required APIs.

Getting Started

To install do:


npm install eventful-node

Then you can require and intiailze a new client with your api_key:


var eventful = require('eventful-node');
var client = new eventful.Client(<YOUR EVENTFUL API KEY>);

Searching for events

To search you can use the search function. Pass a searchEventOptions and the callback.


client.searchEvents({ options }, callback);

Example - Get all events listed in eventful with keyword 'music':


client.searchEvents({ keywords: 'music' }, function(err, data){

  if(err){
  
    return console.error(err);
  
  }
  
  console.log('Recieved ' + data.search.total_items + ' events');
  
  console.log('Event listings: ');
  
  //print the title of each event
  for(var i in data.search.events){
  
    console.log(data.search.events[i].title);
  
  }

});

Getting Possible Event Cateogires

  
  client.listCategories(function(err, data){
    
    if(err){
    
      return console.error(err);
    
    }
    for(var i in data){
      console.log('Available event categories: ');
      console.log('id:' + data[i].id);
      console.log('id:' + data[i].name);
    }
  });
  

Building

This library is built and tested using gruntjs. Be sure to have the grunt command line interface (cli) installed globally on your machine:

# On some systems, you may need to run this command with sudo
npm install grunt-cli -g

To build eventful-node, fork or clone this repository and do:


npm install --dev
grunt

This will compile the typescript into javascript, minify it and place it in the ./bin folder.

Testing

To run the associated unit tests do:

Unix/Linux:


export API_KEY=<YOUR_EVENTFUL_API_KEY>
grunt test

Windows:


set API_KEY=<YOUR_EVENTFUL_API_KEY>
grunt test

Contributing

You can find the latest build status here

This library is written in typescript and as such contributions must be made in typescript. To make things easier, you can start this grunt watch task which will automatically validate and compile your typescript from ./src/eventful-node.ts to javascript in ./lib/eventful-node.js.

grunt watch

Please check the issues tab with 'help wanted' issues to contribute.