Class: MeetupOrbit::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/meetup_orbit/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ Client

Returns a new instance of Client.



36
37
38
39
40
41
# File 'lib/meetup_orbit/client.rb', line 36

def initialize(params = {})
  @orbit_api_key = params.fetch(:orbit_api_key, ENV["ORBIT_API_KEY"])
  @orbit_workspace = params.fetch(:orbit_workspace, ENV["ORBIT_WORKSPACE_ID"])
  @meetup_urlname = check_urlname(params.fetch(:meetup_urlname, ENV["MEETUP_URLNAME"]))
  @historical_import = params.fetch(:historical_import, false)
end

Instance Attribute Details

#historical_importObject

Returns the value of attribute historical_import.



34
35
36
# File 'lib/meetup_orbit/client.rb', line 34

def historical_import
  @historical_import
end

#meetup_urlnameObject

Returns the value of attribute meetup_urlname.



34
35
36
# File 'lib/meetup_orbit/client.rb', line 34

def meetup_urlname
  @meetup_urlname
end

#orbit_api_keyObject

Returns the value of attribute orbit_api_key.



34
35
36
# File 'lib/meetup_orbit/client.rb', line 34

def orbit_api_key
  @orbit_api_key
end

#orbit_workspaceObject

Returns the value of attribute orbit_workspace.



34
35
36
# File 'lib/meetup_orbit/client.rb', line 34

def orbit_workspace
  @orbit_workspace
end

Instance Method Details

#event_rsvpsObject



43
44
45
46
47
48
49
50
# File 'lib/meetup_orbit/client.rb', line 43

def event_rsvps
  MeetupOrbit::Meetup.new(
    meetup_urlname: @meetup_urlname,
    orbit_api_key: @orbit_api_key,
    orbit_workspace: @orbit_workspace,
    historical_import: @historical_import
  ).process_event_rsvps
end