module Bob::Fetchers::Github

Public Instance Methods

create_job(data) click to toggle source
# File lib/bob/fetchers/github.rb, line 14
def create_job(data)
  opts = {
    name: data["title"],
    description: data["description"],
    company_name: data["company"],
    company_logo: data["company_logo"],
    company_url: data["company_url"],
    extra_info: data
  }

  ::Bob::Job.new(opts)
end
fetch(url) click to toggle source
# File lib/bob/fetchers/github.rb, line 8
def fetch(url)
  response = URI("#{url}.json").read

  create_job ::Oj.load(response)
end