Skip to content

Commit

Permalink
Adding stack overflow provider
Browse files Browse the repository at this point in the history
  • Loading branch information
karllhughes committed Nov 29, 2016
1 parent 3667d2e commit 7a3bf56
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,14 @@
# Changelog
All Notable changes to `jobs-multi` will be documented in this file.

## 0.9.0 - 2016-11-29

### Added
- Support for [Stack Overflow Jobs](https://github.com/jobapis/jobs-stackoverflow)

### Fixed
- Updated list of providers in readme

## 0.8.0 - 2016-11-15

### Added
Expand Down
9 changes: 9 additions & 0 deletions README.md
Expand Up @@ -19,15 +19,21 @@ $providers = [
'DeveloperKey' => '<YOUR DEVELOPER KEY>',
],
'Careercast' => [],
'Careerjet' => [
'affid' => '<YOUR AFFILIATE ID>',
],
'Dice' => [],
'Github' => [],
'Govt' => [],
'Ieee' => [],
'Indeed' => [
'publisher' => '<YOUR PUBLISHER ID>',
],
'Jobinventory' => [],
'Juju' => [
'partnerid' => '<YOUR PARTNER ID>',
],
'Stackoverflow' => [],
'Usajobs' => [
'AuthorizationKey' => '<YOUR API KEY>',
],
Expand Down Expand Up @@ -60,12 +66,15 @@ This package currently supports the following API providers:

- [Careerbuilder](https://github.com/jobapis/jobs-careerbuilder)
- [Careercast](https://github.com/jobapis/jobs-careercast)
- [Careerjet](https://github.com/jobapis/jobs-careerjet)
- [Dice](https://github.com/jobapis/jobs-dice)
- [Github](https://github.com/jobapis/jobs-github)
- [Govt](https://github.com/jobapis/jobs-govt)
- [IEEE](https://github.com/jobapis/jobs-ieee)
- [Indeed](https://github.com/jobapis/jobs-indeed)
- [Jobinventory](https://github.com/jobapis/jobs-jobinventory)
- [Juju](https://github.com/jobapis/jobs-juju)
- [Stack Overflow](https://github.com/jobapis/jobs-stackoverflow)
- [USAJobs](https://github.com/jobapis/jobs-usajobs)
- [Ziprecruiter](https://github.com/jobapis/jobs-ziprecruiter)

Expand Down
1 change: 1 addition & 0 deletions composer.json
Expand Up @@ -29,6 +29,7 @@
"jobapis/jobs-indeed": "^1.0.0",
"jobapis/jobs-jobinventory": "^0.1.0",
"jobapis/jobs-juju": "^2.0.0",
"jobapis/jobs-stackoverflow": "^0.1.0",
"jobapis/jobs-usajobs": "^0.2.0",
"jobapis/jobs-ziprecruiter": "^1.0.0"
},
Expand Down
10 changes: 10 additions & 0 deletions src/JobsMulti.php
Expand Up @@ -133,6 +133,9 @@ public function setKeyword($keyword)
case 'Juju':
$query->set('k', $keyword);
break;
case 'Stackoverflow':
$query->set('q', $keyword);
break;
case 'Usajobs':
$query->set('Keyword', $keyword);
break;
Expand Down Expand Up @@ -197,6 +200,9 @@ public function setLocation($location)
case 'Juju':
$query->set('l', $location);
break;
case 'Stackoverflow':
$query->set('l', $location);
break;
case 'Usajobs':
$query->set('LocationName', $location);
break;
Expand Down Expand Up @@ -262,6 +268,10 @@ public function setPage($page = 1, $perPage = 10)
$query->set('page', $page);
$query->set('jpp', $perPage);
break;
case 'Stackoverflow':
$query->set('pg', $page);
// No per_page option
break;
case 'Usajobs':
$query->set('Page', $page);
$query->set('ResultsPerPage', $perPage);
Expand Down
9 changes: 9 additions & 0 deletions tests/src/JobsMultiTest.php
Expand Up @@ -119,6 +119,9 @@ public function testItCanSetKeywordOnAllProviders()
case 'Juju':
$this->assertEquals($keyword, $queries[$key]->get('k'));
break;
case 'Stackoverflow':
$this->assertEquals($keyword, $queries[$key]->get('q'));
break;
case 'Usajobs':
$this->assertEquals($keyword, $queries[$key]->get('Keyword'));
break;
Expand Down Expand Up @@ -175,6 +178,9 @@ public function testItCanSetLocationOnAllProviders()
case 'Juju':
$this->assertEquals($location, $queries[$key]->get('l'));
break;
case 'Stackoverflow':
$this->assertEquals($location, $queries[$key]->get('l'));
break;
case 'Usajobs':
$this->assertEquals($location, $queries[$key]->get('LocationName'));
break;
Expand Down Expand Up @@ -248,6 +254,9 @@ public function testItCanSetPageOnAllProviders()
$this->assertEquals($perPage, $queries[$key]->get('jpp'));
$this->assertEquals($page, $queries[$key]->get('page'));
break;
case 'Stackoverflow':
$this->assertEquals($page, $queries[$key]->get('pg'));
break;
case 'Usajobs':
$this->assertEquals($page, $queries[$key]->get('Page'));
$this->assertEquals($perPage, $queries[$key]->get('ResultsPerPage'));
Expand Down

0 comments on commit 7a3bf56

Please sign in to comment.