Skip to content

Commit

Permalink
Merge pull request #4 from JobBrander/adding_setters
Browse files Browse the repository at this point in the history
Adding setters
  • Loading branch information
karllhughes committed Oct 10, 2015
2 parents f03b4e6 + c87624f commit 440fa13
Show file tree
Hide file tree
Showing 6 changed files with 176 additions and 183 deletions.
14 changes: 4 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,12 @@ php:
before_script:
- travis_retry composer self-update
- travis_retry composer install --no-interaction --prefer-source --dev
- travis_retry pyrus install pear/PHP_CodeSniffer
- travis_retry phpenv rehash

script:
- phpcs --standard=psr2 src/
- phpunit --coverage-text --coverage-clover=coverage.clover
- ./vendor/bin/phpcs --standard=psr2 src/
- ./vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover

after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover

matrix:
allow_failures:
- php: 7.0
- php: hhvm
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ] && [ "$TRAVIS_PHP_VERSION" != "7.0" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ] && [ "$TRAVIS_PHP_VERSION" != "7.0" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
# Changelog
All Notable changes to `jobs-jobs2careers` will be documented in this file

## 1.0.0 - 2015-10-10

### Added
- Support for all setter methods outlined in the [Jobs2Careers API](http://api.jobs2careers.com/api/spec.pdf)
- Readme documentation for all supported methods

### Deprecated
- Nothing

### Fixed
- Sorting methods alphabetically
- Travis-ci support for PHP 7.0 and HHVM

### Removed
- setCity and setState methods not supported by official API

### Security
- Nothing

## 0.1.2 - 2015-08-14

### Added
Expand Down
29 changes: 24 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,33 @@ Usage is the same as Job Branders's Jobs Client, using `\JobBrander\Jobs\Client\
```php
$client = new JobBrander\Jobs\Client\Provider\J2c([
'id' => 'Jobs2Careers Partner ID',
'password' => 'Jobs2Careers Password'
'pass' => 'Jobs2Careers Password'
]);

// Search for 200 job listings for 'project manager' in Chicago, IL
$jobs = $client->setKeyword('project manager') // Query string (keyword) to search for
->setCity('Chicago') // Combined with state to create 'location' parameter in API
->setState('IL')
->setCount(200) // Max number of results (not to exceed 200)
$jobs = $client
// API Parameters from [Official Jobs2Careers documentation](http://api.jobs2careers.com/api/spec.pdf)
->setId() // (Required) Your unique Publisher ID (as shown in the Feed Manager)
->setPass() // (Required) Your unique Publisher Password (as shown in your Feed Manager)
->setIp() // (Required) Preferably the END USER's IP (unless email)
->setQ() // (Either q or l or both should be present) URL encoded query string (keyword)
->setL() // (Either q or l or both should be present) location (city, state, zip, etc)
->setStart() // (Optional) Start offset
->setSort() // (Optional) Either "d" by date or "r" by relevance, defaults to "r"
->setIndustry() // (Optional) An industry string or ID (see API docs) to include
->setIndustryex() // (Optional) An industry string or ID (see API docs) to exclude
->setFormat() // (Optional) API output format (should not be used)
->setM() // (Optional) Mobile optimized jobs only if "1"
->setLimit() // (Optional) Max number of results (not to exceed 200). Defaults to 10
->setLink() // (Optional) Bypass JS to expose the direct link to the listing
->setFull_Desc() // (Optional) Shows full job description if "1"
->setJobid() // (Optional) Return only a specific active job ID
->setJobtype() // (Optional) Return only full time (1), part time (2), or gigs (4). Can have 1 or more values
// Extra parameters, not supported by official API
->setCount(200) // Alias for setLimit()
->setKeyword('project manager') // Alias for setQ()
->setPartnerId() // Alias for setId()
->setPartnerPass() // Alias for setPass()
->getJobs();
```

Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@
"jobbrander/jobs-common": "~1.0.3"
},
"require-dev": {
"phpunit/phpunit": "3.7.*",
"phpunit/phpunit": ">=4.6",
"phpunit/php-code-coverage": "~2.0",
"mockery/mockery": ">=0.9.4"
"mockery/mockery": ">=0.9.4",
"squizlabs/php_codesniffer": "~2.0"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 440fa13

Please sign in to comment.