Ejemplo n.º 1
0
 public function testItWillIncludeUserAgentIfAvailableAndNotProvided()
 {
     $agent = uniqid();
     $_SERVER['HTTP_USER_AGENT'] = $agent;
     $client = new Indeed();
     $url = $client->getUrl();
     $this->assertContains('useragent=' . $agent, $url);
 }
 private function indeed($data)
 {
     $client = new Indeed(['publisher' => \Config::get('joblistings.indeed.id'), 'v' => 2, 'highlight' => 0]);
     $jobs = $client->setKeyword($data['company'] . " " . $data['keyword'])->setFormat('json')->setLocation($data['location'])->setSort($data['sort'])->setRadius($data['radius'])->setPage($data['page'])->setCount($data['count'])->setDaysBack($data['days'])->getJobs();
     return $jobs;
 }