Skip to content

Commit

Permalink
Merge pull request #7 from jobapis/v1
Browse files Browse the repository at this point in the history
Version 1.0 release
  • Loading branch information
karllhughes authored Sep 22, 2016
2 parents 38242c2 + c496490 commit feacd9a
Show file tree
Hide file tree
Showing 12 changed files with 660 additions and 490 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
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-careercast` will be documented in this file

## 1.0.0 - 2015-09-22

### Added
- Support for V2 of jobs common
- Real API call integration test

### Changed
- Default to JSON output format which limits the input parameters, but allows more detailed job objects.

## 0.2.0 - 2015-10-19

### 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-careercast).
We accept contributions via Pull Requests on [Github](https://github.com/jobapis/jobs-careercast).


## 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>, Steven Maguire <stevenmaguire@gmail.com>
Copyright 2016 Karl Hughes <[email protected]>

> Licensed under the Apache License, Version 2.0 (the "License");
> you may not use this file except in compliance with the License.
Expand Down
78 changes: 45 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,64 @@
# CareerCast RSS Jobs Client

[![Latest Version](https://img.shields.io/github/release/JobBrander/jobs-careercast.svg?style=flat-square)](https://github.com/JobBrander/jobs-careercast/releases)
[![Latest Version](https://img.shields.io/github/release/jobapis/jobs-careercast.svg?style=flat-square)](https://github.com/jobapis/jobs-careercast/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-careercast/master.svg?style=flat-square&1)](https://travis-ci.org/JobBrander/jobs-careercast)
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/JobBrander/jobs-careercast.svg?style=flat-square)](https://scrutinizer-ci.com/g/JobBrander/jobs-careercast/code-structure)
[![Quality Score](https://img.shields.io/scrutinizer/g/JobBrander/jobs-careercast.svg?style=flat-square)](https://scrutinizer-ci.com/g/JobBrander/jobs-careercast)
[![Total Downloads](https://img.shields.io/packagist/dt/jobbrander/jobs-careercast.svg?style=flat-square)](https://packagist.org/packages/jobbrander/jobs-careercast)
[![Build Status](https://img.shields.io/travis/jobapis/jobs-careercast/master.svg?style=flat-square&1)](https://travis-ci.org/jobapis/jobs-careercast)
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/jobapis/jobs-careercast.svg?style=flat-square)](https://scrutinizer-ci.com/g/jobapis/jobs-careercast/code-structure)
[![Quality Score](https://img.shields.io/scrutinizer/g/jobapis/jobs-careercast.svg?style=flat-square)](https://scrutinizer-ci.com/g/jobapis/jobs-careercast)
[![Total Downloads](https://img.shields.io/packagist/dt/jobapis/jobs-careercast.svg?style=flat-square)](https://packagist.org/packages/jobapis/jobs-careercast)

This package provides [CareerCast Jobs RSS](http://www.careercast.com/jobs/results/keyword?format=rss)
support for the JobBrander's [Jobs Client](https://github.com/JobBrander/jobs-common).
support for the [Jobs Common project](https://github.com/JobBrander/jobs-common).

## Installation

To install, use composer:

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

## Usage

Usage is the same as Job Branders's Jobs Client, using `\JobBrander\Jobs\Client\Providers\Careercast` as the provider.
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\CareercastQuery([
'keyword' => 'engineering'
]);
```

Or via the "set" method. All of the parameters documented can be added.

```php
// Add parameters via the set() method
$query->set('location', 'Chicago, IL');
```

You can even chain them if you'd like.

```php
// Add parameters via the set() method
$query->set('company', 'General Electric')
->set('page', '2');
```

Then inject the query object into the provider.

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

And call the "getJobs" method to retrieve results.

```php
$client = new JobBrander\Jobs\Client\Provider\Careercast();

// Search for 100 job listings for 'project manager' in Chicago, IL
$jobs = $client
// Setters from CareerCast's [Advanced Search](http://www.careercast.com/jobs/search/advanced)
->setRows() // Number of jobs to return per page
->setPage() // Set page number
->setRadius() // Location search radius
->setNormalizedJobTitle() // Choose from a standard list of job titles
->setCategory() // Category name
->setCompany() // Company name
->setJobSource() // "staffing_firm" or "direct_employer"
->setPostDate() // Post date range string wrapped in brackets and URL encoded, eg: "%5BNOW-7DAYS+TO+NOW%5D"
->setFormat() // Defaults to "rss"
->setWorkStatus() // "full_time" or "part_time"
->setLocation('Chicago, Illinois, United States')
->setKwsJobTitleOnly() // Set to "true" to only search job titles
// More
->setKeyword('project manager') // Keyword to search as part of the URL
->setCount(100) // Alias for setRows() above
->getJobs();
// 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 @@ -56,14 +68,14 @@ $ ./vendor/bin/phpunit

## Contributing

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

## Credits

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

## License

The Apache 2.0. Please see [License File](https://github.com/jobbrander/jobs-careercast/blob/master/LICENSE) for more information.
The Apache 2.0. Please see [License File](https://github.com/jobapis/jobs-careercast/blob/master/LICENSE) for more information.
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "jobbrander/jobs-careercast",
"name": "jobapis/jobs-careercast",
"type": "library",
"description": "Making it simple to integrate your application with Careercast's Jobs RSS feed.",
"keywords": [
Expand All @@ -20,7 +20,7 @@
],
"require": {
"php": ">=5.5.0",
"jobbrander/jobs-common": "~1.0.3"
"jobapis/jobs-common": "^2.0.0"
},
"require-dev": {
"phpunit/phpunit": ">=4.6",
Expand All @@ -30,12 +30,12 @@
},
"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\\Providers\\Test\\": "tests/src/"
}
}
}
215 changes: 0 additions & 215 deletions src/Careercast.php

This file was deleted.

Loading

0 comments on commit feacd9a

Please sign in to comment.