Class: Meetup::Api
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
Instance Method Summary collapse
- #create_event(options = {}) ⇒ Object
- #find_cities(options = {}) ⇒ Object
- #find_groups(options = {}) ⇒ Object
-
#initialize(api_key = ENV['MEETUP_API_KEY']) ⇒ Api
constructor
A new instance of Api.
Constructor Details
#initialize(api_key = ENV['MEETUP_API_KEY']) ⇒ Api
Returns a new instance of Api.
12 13 14 |
# File 'lib/meetup.rb', line 12 def initialize(api_key = ENV['MEETUP_API_KEY']) @api_key = api_key end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
10 11 12 |
# File 'lib/meetup.rb', line 10 def api_key @api_key end |
Instance Method Details
#create_event(options = {}) ⇒ Object
25 26 27 |
# File 'lib/meetup.rb', line 25 def create_event( = {}) Hashie::Mash.new( Meetup::Api.post("/events", query: merged()) ) end |
#find_cities(options = {}) ⇒ Object
21 22 23 |
# File 'lib/meetup.rb', line 21 def find_cities( = {}) Hashie::Mash.new(Meetup::Api.get("/cities", query: merged())) end |
#find_groups(options = {}) ⇒ Object
16 17 18 |
# File 'lib/meetup.rb', line 16 def find_groups( = {}) Hashie::Mash.new(Meetup::Api.get("/groups", query: merged())) end |