Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (15 sloc) 908 Bytes
# Description:
# Get information from the Resumator API.
#
# Commands:
# hubot job list - Returns the current list of jobs from The Resumator
# hubot job applicants - Returns the current list of applicants in the pipeline of the Resumator
module.exports = (robot) ->
robot.respond /job list$/i, (msg) ->
robot.http("https://api.resumatorapi.com/v1/jobs?apikey=#{process.env.RESUMATOR_APIKEY}")
.get() (err, res, body) ->
msg.send "#{job.title} > http://#{process.env.RESUMATOR_USERNAME}.theresumator.com/apply/#{job.board_code}" for job in JSON.parse(body)[0..10] when job.status == "Open"
robot.respond /job applicants$/i, (msg) ->
robot.http("https://api.resumatorapi.com/v1/applicants?apikey=#{process.env.RESUMATOR_APIKEY}")
.get() (err, res, body) ->
msg.send "#{app.first_name} #{app.last_name} for [#{app.job_title}]" for app in JSON.parse(body)[0..10]
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.