Skip to content

Commit

Permalink
Adding ieee jobs provider
Browse files Browse the repository at this point in the history
  • Loading branch information
karllhughes committed Nov 15, 2016
1 parent 7fd40a7 commit 3667d2e
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Changelog
All Notable changes to `jobs-multi` will be documented in this file.

## 0.8.0 - 2016-11-15

### Added
- Support for [IEEE JobSite](https://github.com/jobapis/jobs-ieee)

## 0.7.0 - 2016-11-09

### Added
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"jobapis/jobs-dice": "^1.0.0",
"jobapis/jobs-github": "^1.0.0",
"jobapis/jobs-govt": "^1.0.0",
"jobapis/jobs-ieee": "^0.1.0",
"jobapis/jobs-indeed": "^1.0.0",
"jobapis/jobs-jobinventory": "^0.1.0",
"jobapis/jobs-juju": "^2.0.0",
Expand Down
10 changes: 10 additions & 0 deletions src/JobsMulti.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ public function setKeyword($keyword)
case 'Govt':
$query->set('query', $keyword);
break;
case 'Ieee':
$query->set('keyword', $keyword);
break;
case 'Indeed':
$query->set('q', $keyword);
break;
Expand Down Expand Up @@ -182,6 +185,9 @@ public function setLocation($location)
$queryString = $query->get('query').' in '.$location;
$query->set('query', $queryString);
break;
case 'Ieee':
$query->set('location', $location);
break;
case 'Indeed':
$query->set('l', $location);
break;
Expand Down Expand Up @@ -240,6 +246,10 @@ public function setPage($page = 1, $perPage = 10)
$query->set('size', $perPage);
$query->set('from', $this->getStartFrom($page, $perPage));
break;
case 'Ieee':
$query->set('page', $page);
$query->set('rows', $perPage);
break;
case 'Indeed':
$query->set('limit', $perPage);
$query->set('start', $this->getStartFrom($page, $perPage));
Expand Down
11 changes: 11 additions & 0 deletions tests/src/JobsMultiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public function setUp()
'Dice' => [],
'Github' => [],
'Govt' => [],
'Ieee' => [],
'Indeed' => [
'publisher' => uniqid(),
],
Expand Down Expand Up @@ -106,6 +107,9 @@ public function testItCanSetKeywordOnAllProviders()
case 'Govt':
$this->assertEquals($keyword, $queries[$key]->get('query'));
break;
case 'Ieee':
$this->assertEquals($keyword, $queries[$key]->get('keyword'));
break;
case 'Indeed':
$this->assertEquals($keyword, $queries[$key]->get('q'));
break;
Expand Down Expand Up @@ -159,6 +163,9 @@ public function testItCanSetLocationOnAllProviders()
case 'Govt':
$this->assertNotEquals(false, strpos($queries[$key]->get('query'), 'in '.$location));
break;
case 'Ieee':
$this->assertEquals($location, $queries[$key]->get('location'));
break;
case 'Indeed':
$this->assertEquals($location, $queries[$key]->get('l'));
break;
Expand Down Expand Up @@ -225,6 +232,10 @@ public function testItCanSetPageOnAllProviders()
$this->assertEquals($perPage, $queries[$key]->get('size'));
$this->assertEquals($startFrom, $queries[$key]->get('from'));
break;
case 'Ieee':
$this->assertEquals($page, $queries[$key]->get('page'));
$this->assertEquals($perPage, $queries[$key]->get('rows'));
break;
case 'Indeed':
$this->assertEquals($perPage, $queries[$key]->get('limit'));
$this->assertEquals($startFrom, $queries[$key]->get('start'));
Expand Down

0 comments on commit 3667d2e

Please sign in to comment.