class Jekyll::Meetup::ApiClient

Simple API client for Meetup since there doesn't seem to be an open source one that supports OAuth.

Constants

API_BASE

Public Class Methods

events(urlname) click to toggle source
# File lib/jekyll/meetup/api_client.rb, line 11
def self.events(urlname)
  request_uri = API_BASE + format('%<urlname>s/events', urlname: urlname)
  request_uri.query = URI.encode_www_form(
    scroll: 'next_upcoming'
  )

  body = Net::HTTP.get(request_uri)
  JSON.parse(body)
end