Module: MCLI
- Defined in:
- lib/meetup-cli/api.rb,
lib/meetup-cli/version.rb
Constant Summary collapse
- VERSION =
'2.0.0'
Class Method Summary collapse
- .get_didntgo_events ⇒ Object
-
.get_going_events ⇒ Object
Meetup API docs: www.meetup.com/meetup_api/docs/2/events/.
- .get_notgoing_events ⇒ Object
- .get_past_events ⇒ Object
- .get_upcoming_events ⇒ Object
- .get_went_events ⇒ Object
- .init_api ⇒ Object
Class Method Details
.get_didntgo_events ⇒ Object
28 29 30 |
# File 'lib/meetup-cli/api.rb', line 28 def self.get_didntgo_events api = init_api.fetch(:events, {member_id: 'self', status: 'past', desc: 'true', rsvp: 'no'}) end |
.get_going_events ⇒ Object
Meetup API docs: www.meetup.com/meetup_api/docs/2/events/
12 13 14 |
# File 'lib/meetup-cli/api.rb', line 12 def self.get_going_events api = init_api.fetch(:events, {member_id: 'self', rsvp: 'yes'}) end |
.get_notgoing_events ⇒ Object
16 17 18 |
# File 'lib/meetup-cli/api.rb', line 16 def self.get_notgoing_events api = init_api.fetch(:events, {member_id: 'self', rsvp: 'no'}) end |
.get_past_events ⇒ Object
32 33 34 35 |
# File 'lib/meetup-cli/api.rb', line 32 def self.get_past_events # Unlike upcoming events, does not return valid results if 'rsvp' value is not explicitly specified api = init_api.fetch(:events, {member_id: 'self', status: 'past', desc: 'true', rsvp: 'yes,no'}) end |
.get_upcoming_events ⇒ Object
20 21 22 |
# File 'lib/meetup-cli/api.rb', line 20 def self.get_upcoming_events api = init_api.fetch(:events, {member_id: 'self'}) end |
.get_went_events ⇒ Object
24 25 26 |
# File 'lib/meetup-cli/api.rb', line 24 def self.get_went_events api = init_api.fetch(:events, {member_id: 'self', status: 'past', desc: 'true', rsvp: 'yes'}) end |
.init_api ⇒ Object
4 5 6 7 8 |
# File 'lib/meetup-cli/api.rb', line 4 def self.init_api RMeetup::Client.new do |meetup_config| meetup_config.api_key = $config['api_key'] end end |