Skip to content

Instantly share code, notes, and snippets.

@leenyburger
Created January 7, 2018 18:13
Show Gist options
  • Select an option

  • Save leenyburger/03b5cc708e06dd78200108605d4798b5 to your computer and use it in GitHub Desktop.

Select an option

Save leenyburger/03b5cc708e06dd78200108605d4798b5 to your computer and use it in GitHub Desktop.
class Meetup
include HTTParty
base_uri 'api.meetup.com'
def get_data
self.class.get('/operation-code-hampton-roads/events')
end
def events
if get_data.code.to_i == 200
get_data.parsed_response
else
raise "Error fetching data from Meetup API"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment