Skip to content

Commit 9293603

Browse files
authored
Merge pull request #8 from jobapis/v1
Version 1.0 release
2 parents fa5153e + b770f0a commit 9293603

File tree

12 files changed

+511
-511
lines changed

12 files changed

+511
-511
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ build/
33
phpunit.xml
44
composer.lock
55
vendor
6+
.idea

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,32 @@
11
# Changelog
22
All Notable changes to `jobs-govt` will be documented in this file
33

4+
## 1.0.0 - 2016-09-03
5+
6+
### Added
7+
- Updated package name in composer file.
8+
9+
### Fixed
10+
- Test namespace.
11+
12+
## 1.0.0-beta - 2016-09-02
13+
14+
### Added
15+
- Changed namespace and organization to `jobapis`.
16+
- Support for v2 of jobs-common package.
17+
18+
### Deprecated
19+
- Nothing
20+
21+
### Fixed
22+
- Nothing
23+
24+
### Removed
25+
- Old getters and setters.
26+
27+
### Security
28+
- Nothing
29+
430
## 0.6.0 - 2015-09-28
531

632
### Added

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

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

5-
We accept contributions via Pull Requests on [Github](https://github.com/jobbrander/jobs-indeed).
5+
We accept contributions via Pull Requests on [Github](https://github.com/jobapis/jobs-govt).
66

77

88
## Pull Requests

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# The Apache 2.0 License
22

3-
Copyright 2015 Karl Hughes <khughes.me@gmail.com>, Steven Maguire <stevenmaguire@gmail.com>
3+
Copyright 2016 Karl Hughes <khughes.me@gmail.com>
44

55
> Licensed under the Apache License, Version 2.0 (the "License");
66
> you may not use this file except in compliance with the License.

README.md

Lines changed: 42 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,67 @@
11
# Government Jobs Client
22

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

1010
This package provides [Government Jobs API](http://search.digitalgov.gov/developer/jobs.html)
11-
support for the JobBrander's [Jobs Client](https://github.com/JobBrander/jobs-common).
11+
support for the [Jobs Common Project](https://github.com/jobapis/jobs-common).
1212

1313
## Installation
1414

1515
To install, use composer:
1616

1717
```
18-
composer require jobbrander/jobs-govt
18+
composer require jobapis/jobs-govt
1919
```
2020

2121
## Usage
2222

23-
Usage is the same as Job Branders's Jobs Client, using `\JobBrander\Jobs\Client\Provider\Govt`
24-
as the provider.
23+
Create a Query object and add all the parameters you'd like via the constructor.
24+
25+
```php
26+
// Add parameters to the query via the constructor
27+
$query = new JobApis\Jobs\Client\Queries\GovtQuery([
28+
'hl' => '1'
29+
]);
30+
```
31+
32+
Or via the "set" method. All of the parameters documented in the API's documentation can be added.
2533

2634
```php
27-
$client = new JobBrander\Jobs\Client\Provider\Govt();
28-
29-
// Search for 200 job listings for 'project manager' in Chicago, IL
30-
$jobs = $client
31-
// API parameters
32-
->setQuery() // Attempts to extract as much "signal" as possible from the input text. Handles word variants, so a search on "nursing jobs" will find a job titled "nurse practitioner" and "RN." When parts of the query parameter are used to search against the position title, the results are ordered by relevance. When no query parameter is specified, they are ordered by date with the most recent listed first.
33-
->setOrganizationIds() // A comma-separated string specifying which federal, state, or local agencies to use as a filter.
34-
->setHl() // No highlighting is included by default. Use 'hl=1' to highlight terms in the position title that match terms in the user's search.
35-
->setSize() // Specifies how many results are returned (up to 100 at a time).
36-
->setFrom() // Specifies the starting record.
37-
->setTags() // A comma-separated string specifying the level of government. Current tags are federal, state, county, and city.
38-
->setLatLon() // Comma-separated pair denoting the position of the searcher looking for a job. For example, 'lat_lon=37.783333,-122.416667' is the value for San Francisco, CA.
39-
// Jobbrander parameters
40-
->setKeyword('project manager') // See "setQuery()" method above
41-
->setCount(100) // See "setSize()" method above
42-
->getJobs();
35+
// Add parameters via the set() method
36+
$query->set('query', 'engineering');
4337
```
4438

45-
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.
39+
You can even chain them if you'd like.
40+
41+
```php
42+
// Add parameters via the set() method
43+
$query->set('size', '100')
44+
->set('from', '200');
45+
```
4646

47-
### Location Queries
47+
*Note: The government jobs API doesn't support adding location as a parameter, but their keyword or lat_lon parameters can be used for this purpose.*
4848

49-
Because this API does not support location-based queries, you will need to add the location
50-
to your setKeyword() method call. For example:
49+
Then inject the query object into the provider.
5150

51+
```php
52+
// Instantiating provider with a query object
53+
$client = new JobApis\Jobs\Client\Provider\GovtProvider($query);
5254
```
53-
$jobs = $client->setKeyword('project manager in chicago, il')->getJobs();
55+
56+
And call the "getJobs" method to retrieve results.
57+
58+
```php
59+
// Get a Collection of Jobs
60+
$jobs = $client->getJobs();
5461
```
5562

63+
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.
64+
5665
## Testing
5766

5867
``` bash
@@ -61,14 +70,14 @@ $ ./vendor/bin/phpunit
6170

6271
## Contributing
6372

64-
Please see [CONTRIBUTING](https://github.com/jobbrander/jobs-govt/blob/master/CONTRIBUTING.md) for details.
73+
Please see [CONTRIBUTING](https://github.com/jobapis/jobs-govt/blob/master/CONTRIBUTING.md) for details.
6574

6675
## Credits
6776

6877
- [Steven Maguire](https://github.com/stevenmaguire)
6978
- [Karl Hughes](https://github.com/karllhughes)
70-
- [All Contributors](https://github.com/jobbrander/jobs-govt/contributors)
79+
- [All Contributors](https://github.com/jobapis/jobs-govt/contributors)
7180

7281
## License
7382

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

composer.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "jobbrander/jobs-govt",
2+
"name": "jobapis/jobs-govt",
33
"type": "library",
44
"description": "Making it simple to integrate your application with the Government Jobs API.",
55
"keywords": [
@@ -8,23 +8,23 @@
88
"object",
99
"government jobs"
1010
],
11-
"homepage": "https://github.com/JobBrander/jobs-govt",
11+
"homepage": "https://github.com/jobapis/jobs-govt",
1212
"license": "Apache-2.0",
1313
"authors": [
14-
{
15-
"name": "Steven Maguire",
16-
"email": "stevenmaguire@gmail.com",
17-
"homepage": "https://github.com/stevenmaguire"
18-
},
1914
{
2015
"name": "Karl Hughes",
2116
"email": "khughes.me@gmail.com",
2217
"homepage": "https://github.com/karllhughes"
18+
},
19+
{
20+
"name": "Steven Maguire",
21+
"email": "stevenmaguire@gmail.com",
22+
"homepage": "https://github.com/stevenmaguire"
2323
}
2424
],
2525
"require": {
2626
"php": ">=5.5.0",
27-
"jobbrander/jobs-common": "~1.0.3"
27+
"jobapis/jobs-common": "^2.0.0"
2828
},
2929
"require-dev": {
3030
"phpunit/phpunit": ">=4.6",
@@ -34,12 +34,12 @@
3434
},
3535
"autoload": {
3636
"psr-4": {
37-
"JobBrander\\Jobs\\Client\\Providers\\": "src/"
37+
"JobApis\\Jobs\\Client\\": "src/"
3838
}
3939
},
4040
"autoload-dev": {
4141
"psr-4": {
42-
"JobBrander\\Jobs\\Client\\Providers\\Test\\": "tests/src/"
42+
"JobApis\\Jobs\\Client\\Test\\": "tests/src/"
4343
}
4444
}
4545
}

0 commit comments

Comments
 (0)