Skip to content

neektza/rmeetup

 
 

Repository files navigation

rMeetup

Gem Version Build Status Code Climate Coverage Status Inline docs

A Ruby wrapper for the Meetup REST API v2.

Code Sample

Sample code is worth a thousand words:

  client = RMeetup::Client.new do |config|
    config.api_key = "API_KEY"
  end
  
  results = client.fetch(:events, { event_id: 'some_id' })
  results.each do |result|
    # Do something with the result
  end
  
  event = client.post(:event, {:group_id => 'some_group_id',
                               :group_urlname => 'some_group_urlname',
                               :name => 'My Event'})
  
  client.delete(:event, 'event_id')  # May throw exceptions or returns true

Fetch

RMeetup::Client#fetch takes a data model type and set of options as arguments. Possible data models are:

  • :events
  • :open_events
  • :groups
  • :rsvps
  • :cities
  • :members
  • :photos
  • :venues
  • :open_venues

The options that may be passed can be found on the Meetup API documentation. Please see http://www.meetup.com/meetup_api/docs/ and look up the model that you are calling (i.e. for :events, look at the API call "GET /2/events" at http://www.meetup.com/meetup_api/docs/2/events/).

Post

RMeetup::Client#post takes a data model type and set of options as arguments. Possible data models are:

  • :event
  • :event_comment

The options that may be passed can be found on the Meetup API documentation. Please see http://www.meetup.com/meetup_api/docs/ and look up the model that you are calling (i.e. for :event, look at the API call POST /2/event at http://www.meetup.com/meetup_api/docs/2/event).

Delete

RMeetup::Client#delete takes a data model type, object's id and set of options as arguments. Possible data models are:

  • :event
  • :event_comment
  • :member_photo
  • :photo

Installation

... via Rubygems/Bundler.

Credits

  • Jared Pace - built initial iteration
  • Jason Berlinsky - forked, expanded, documented for api v1.0
  • Tommy Chan - added venues, updated to api v2.0
  • Tanner Mares - check for type in base_url, fix event time and venue, also updated to api v2.0
  • Joshua Calloway - added post functionality and event comment creation
  • Zishan Ahmad - consolidated changes, updated docs
  • Nikica Jokić - thread-safe client refactoring, setup for TravisCI, CodeClimate, Coveralls...
  • Emin Bugra Saral - added delete functionality along with several data models, added event creation

About

A Ruby Gem for accessing the Meetup.com API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%