Code Monkey home page Code Monkey logo

meetup_api's Introduction

= Meetup API

== Developers
* {Bosco So}[http://boscomonkey.com] <rubymeetup _AT_ boscoso _DOT_ com>

== Description
Meetup API is a port of the official Python client released by Meetup
for their API. This port provides an object based API to query or
update Meetup data via pure Ruby.  It hides the ugly HTTP/REST calls
from your code.

The Meetup Python API client can be found at
http://www.meetup.com/meetup_api/clients/

== External Dependencies
* Ruby (tested with 1.8.6)
* net/http
* json (tested with versions: 1.1.3)

== Usage Examples
Start by creating an instance of the Meetup object with your API key
as the constructor argument. You can get your API key at
http://www.meetup.com/meetup_api/key/

mu = MeetupApi::Client.new 'your_api_key'

Then, you can query the API directly by using one of the following
methods:

mu.get_events HASH_PARAMS
mu.get_rsvps HASH_PARAMS

Call the method using keyword args containing the parameters of the
query (identical to parameters described on the main documentation
page - http://www.meetup.com/meetup_api/docs/). For example, find all
the events around zip 94108:

local_events = mu.get_events :zip => 94108

Another example, find the event with id 9348580 (the results method
still returns an array, but it only has 1 element):

ruby_events = mu.get_events :id => 9348580

The returned value will be an object of type
MeetupApi::ApiResponse. This object's property meta is a Hash
containing all the metadata from the query results. The property
results is an Array containing objects of type MeetupApi::Event or
MeetupApi::Rsvp (depending which MeetupApi::Client method was
used). These objects support additional methods that will make API
calls to get more information (taking the MeetupApi::Client object as
an argument to make the request). For example, take the ruby event
from above and retrieve its RSVP list:

first_event = ruby_events.results.first
rsvps = first_event.get_rsvps mu

Of course, if you just wanted to only get the RSVP's, you can simply
call MeetupApi::Client#get_rsvps directly:

rsvps = mu.get_rsvps :event_id => 9348580

== To Do
* Currently, only MeetupApi::Client#get_events and get_rsvps are
  implemented; so, finish the other client methods.
* Implement OAuth

meetup_api's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

sarahmei brimil01

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.