Skip to content

Commit

Permalink
Merge pull request #3 from jobapis/v1
Browse files Browse the repository at this point in the history
Version 1.0
  • Loading branch information
karllhughes committed Jan 6, 2017
2 parents 780a909 + c74b991 commit a5ee5f1
Show file tree
Hide file tree
Showing 13 changed files with 572 additions and 529 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ build/
phpunit.xml
composer.lock
vendor
.idea
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
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Changelog
All Notable changes to `jobs-muse` will be documented in this file

## 1.0.0 - 2017-01-06

### Added
- Support for v.2.0 of jobs-common package.
- Support for v.2 of the Muse API.

### Removed
- Old set_() methods in provider, moved to Query

## 0.2.0 - 2015-10-15

### Added
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Contributions are **welcome** and will be fully **credited**.

We accept contributions via Pull Requests on [Github](https://github.com/jobbrander/jobs-muse).
We accept contributions via Pull Requests on [Github](https://github.com/jobapis/jobs-muse).


## Pull Requests
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The Apache 2.0 License

Copyright 2015 Karl Hughes <khughes.me@gmail.com>
Copyright 2017 Karl Hughes <khughes.me@gmail.com>

> Licensed under the Apache License, Version 2.0 (the "License");
> you may not use this file except in compliance with the License.
Expand Down
69 changes: 45 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,63 @@
# Muse Jobs Client
# TheMuse.com Jobs Client

[![Latest Version](https://img.shields.io/github/release/JobBrander/jobs-muse.svg?style=flat-square)](https://github.com/JobBrander/jobs-muse/releases)
[![Latest Version](https://img.shields.io/github/release/jobapis/jobs-muse.svg?style=flat-square)](https://github.com/jobapis/jobs-muse/releases)
[![Software License](https://img.shields.io/badge/license-APACHE%202.0-brightgreen.svg?style=flat-square)](LICENSE.md)
[![Build Status](https://img.shields.io/travis/JobBrander/jobs-muse/master.svg?style=flat-square&1)](https://travis-ci.org/JobBrander/jobs-muse)
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/JobBrander/jobs-muse.svg?style=flat-square)](https://scrutinizer-ci.com/g/JobBrander/jobs-muse/code-structure)
[![Quality Score](https://img.shields.io/scrutinizer/g/JobBrander/jobs-muse.svg?style=flat-square)](https://scrutinizer-ci.com/g/JobBrander/jobs-muse)
[![Total Downloads](https://img.shields.io/packagist/dt/jobbrander/jobs-muse.svg?style=flat-square)](https://packagist.org/packages/jobbrander/jobs-muse)
[![Build Status](https://img.shields.io/travis/jobapis/jobs-muse/master.svg?style=flat-square&1)](https://travis-ci.org/jobapis/jobs-muse)
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/jobapis/jobs-muse.svg?style=flat-square)](https://scrutinizer-ci.com/g/jobapis/jobs-muse/code-structure)
[![Quality Score](https://img.shields.io/scrutinizer/g/jobapis/jobs-muse.svg?style=flat-square)](https://scrutinizer-ci.com/g/jobapis/jobs-muse)
[![Total Downloads](https://img.shields.io/packagist/dt/jobapis/jobs-muse.svg?style=flat-square)](https://packagist.org/packages/jobapis/jobs-muse)

This package provides [Muse Jobs API](https://www.themuse.com/developers#job-listing)
support for the JobBrander's [Jobs Client](https://github.com/JobBrander/jobs-common).
This package provides [Muse Jobs API](https://www.themuse.com/developers)
support for the JobApis's [Jobs Client](https://github.com/jobapis/jobs-common).

## Installation

To install, use composer:

```
composer require jobbrander/jobs-muse
composer require jobapis/jobs-muse
```

## Usage
Create a Query object and add all the parameters you'd like via the constructor.

```php
// Add parameters to the query via the constructor
$query = new JobApis\Jobs\Client\Queries\MuseQuery([
'api_key' => YOUR_API_ID // Optional: include your api key
]);
```

Or via the "set" method. All of the parameters documented in Indeed's documentation can be added.

```php
// Add parameters via the set() method
$query->set('category', 'Engineering');
```

Usage is the same as Job Branders's Jobs Client, using `\JobBrander\Jobs\Client\Provider\Muse` as the provider.
You can even chain them if you'd like.

```php
$client = new JobBrander\Jobs\Client\Provider\Muse();
// Add parameters via the set() method
$query->set('location', 'Chicago, IL')
->set('company', 'Google');
```

Then inject the query object into the provider.

```php
// Instantiating provider with a query object
$client = new JobApis\Jobs\Client\Provider\MuseProvider($query);
```

And call the "getJobs" method to retrieve results.

// Search for job listings in Chicago, IL
$jobs = $client
->setLocation('Chicago, IL') // A location from the Muse's list of location strings: https://www.themuse.com/developers#job-listing
->setCategory('Education') // A string that restricts search results to jobs in the specified category. A list of valid categories is in the Muse's documentation
->setLevel('Internship') // A string that restricts search results to jobs in the specified experience level. A list of valid levels is in the Muse's documentation
->setCompany('Facebook') // A string that restricts search results to jobs at the specified company.
->setDescending(true) // The sort order of the results (ascending or descending). Valid values are: true, false; The default is true.
->setPage(2) // The requested page of result sets, numbered beginning from 1. Default is 1. If this number exceeds the value of the response property totalPages, the response will contain zero results.
->getJobs();
```php
// Get a Collection of Jobs
$jobs = $client->getJobs();
```

The `getJobs` method will return a [Collection](https://github.com/JobBrander/jobs-common/blob/master/src/Collection.php) of [Job](https://github.com/JobBrander/jobs-common/blob/master/src/Job.php) objects.
This will return a [Collection](https://github.com/jobapis/jobs-common/blob/master/src/Collection.php) of [Job](https://github.com/jobapis/jobs-common/blob/master/src/Job.php) objects.

## Testing

Expand All @@ -46,14 +67,14 @@ $ ./vendor/bin/phpunit

## Contributing

Please see [CONTRIBUTING](https://github.com/jobbrander/jobs-muse/blob/master/CONTRIBUTING.md) for details.
Please see [CONTRIBUTING](https://github.com/jobapis/jobs-muse/blob/master/CONTRIBUTING.md) for details.

## Credits

- [Karl Hughes](https://github.com/karllhughes)
- [All Contributors](https://github.com/jobbrander/jobs-muse/contributors)
- [All Contributors](https://github.com/jobapis/jobs-muse/contributors)

## License

The Apache 2.0. Please see [License File](https://github.com/jobbrander/jobs-muse/blob/master/LICENSE) for more information.
The Apache 2.0. Please see [License File](https://github.com/jobapis/jobs-muse/blob/master/LICENSE) for more information.

17 changes: 9 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "jobbrander/jobs-muse",
"name": "jobapis/jobs-muse",
"type": "library",
"description": "Making it simple to integrate your application with Muse Jobs API.",
"description": "Making it simple to integrate your application with the Muse's Jobs API.",
"keywords": [
"jobs",
"api client",
"object",
"muse",
"themuse.com"
],
"homepage": "https://github.com/JobBrander/jobs-muse",
"homepage": "https://github.com/jobapis/jobs-muse",
"license": "Apache-2.0",
"authors": [
{
Expand All @@ -20,21 +20,22 @@
],
"require": {
"php": ">=5.5.0",
"jobbrander/jobs-common": "~1.0.3"
"jobapis/jobs-common": "^2.0.2"
},
"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": {
"JobBrander\\Jobs\\Client\\Providers\\": "src/"
"JobApis\\Jobs\\Client\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"JobBrander\\Jobs\\Client\\Providers\\Test\\": "tests/src/"
"JobApis\\Jobs\\Client\\Test\\": "tests/src/"
}
}
}
Loading

0 comments on commit a5ee5f1

Please sign in to comment.