15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/gistmeetup.rb', line 15
def post(meetup, , files, options={})
ret = Gist.multi_gist(files, options)
RMeetup::Client.api_key = "311e1e54e55667752236e673758662c"
events = RMeetup::Client.fetch(:events, {:group_urlname => "#{meetup}"})
if events.empty?
groups = RMeetup::Client.fetch(:groups, {:group_urlname => "#{meetup}"})
ret = ""
if groups.empty?
ret = "The meetup '#{meetup}' does not exist."
else
ret = "No meetup events exist for '#{meetup}'"
end
ret
else
nextEvent = events[0]
url = ret["html_url"]
RMeetup::Client.post(:event_comment, {:event_id => "#{nextEvent.id}", :comment => "#{comment} - #{url}" })
"Posted to github on '#{url}' and link to it on '#{meetup}' comments"
end
end
|