New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

meetup

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

meetup

Meetup API node.js client

  • 0.1.0-SNAPSHOT
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

Meetup js

A node.js interface for the meetup.com api based roughly on node-twitter

usage

This library supports both stream and low-level REST client interfaces.

The stream interface takes a path of the streamed resource you wish to consume and a function callback which will be provided a stream object. You can register a listener on one of the following event names.

  • data - emits an single item from the stream
  • error - emits an error throwing in processing of stream

Below is an example set up

var Meetup = require("meetup")
var mup = new Meetup()
mup.stream("/2/rsvps", function(stream){
  stream
    .on("data", function(item){
      console.log("got item " + item)
    }).on("error", function(e) {
       console.log("error! " + e)
    });
});    

The REST interface supports a get and post interface. These REST interfaces require authentication with Meetup before they can be used.

 var Meetup = require("meetup")
 var mup = new Meetup({
   clientId:"YOUR_CLIENT_ID"
   , clientSecret:"YOUR_CLIENT_SECRET"
   , redirectUri:"YOUR_REDIRECT_URI"
   })

Once configured, you can redirect the user-agent to the url returned by mup.getAuthorizeUrl(). Once the user authorizes your client their user-agent will be redirected back to YOUR_REDIRECT_URI with a code needed to obtain an access token.

mup.getAccessToken(code, function(err, access, refresh, others) {
    if (err) {
       // do something about it
    } else {
       // at this point mup is automatically configured with the access token
       // you are free to start making requests here
    }
})

Once you have an access token you can make requests in the form.

mup.get("/2/member/self", function(err, data){
  console.log("got data " + data)
})

Keywords

FAQs

Package last updated on 03 Jun 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc