Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenmaguire committed Aug 7, 2015
0 parents commit c59166b
Show file tree
Hide file tree
Showing 11 changed files with 623 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.DS_Store
build/
phpunit.xml
composer.lock
vendor
35 changes: 35 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
filter:
excluded_paths: [tests/*]
checks:
php:
code_rating: true
remove_extra_empty_lines: true
remove_php_closing_tag: true
remove_trailing_whitespace: true
fix_use_statements:
remove_unused: true
preserve_multiple: false
preserve_blanklines: true
order_alphabetically: true
fix_php_opening_tag: true
fix_linefeed: true
fix_line_ending: true
fix_identation_4spaces: true
fix_doc_comments: true
tools:
external_code_coverage:
timeout: 600
runs: 2
php_analyzer: true
php_code_coverage: false
php_code_sniffer:
config:
standard: PSR2
filter:
paths: ['src']
php_loc:
enabled: true
excluded_dirs: [vendor, tests]
php_cpd:
enabled: true
excluded_dirs: [vendor, tests]
20 changes: 20 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
language: php

php:
- 5.5
- 5.6
- 7.0
- hhvm

before_script:
- travis_retry composer self-update
- travis_retry composer install --no-interaction --prefer-source --dev
- travis_retry phpenv rehash

script:
- ./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
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Changelog
All Notable changes to `jobs-authenticjobs` will be documented in this file

## 0.1.0 - 2015-08-06

### Added
- Initial release!

### Deprecated
- Nothing

### Fixed
- Nothing

### Removed
- Nothing

### Security
- Nothing
32 changes: 32 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Contributing

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

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


## Pull Requests

- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer).

- **Add tests!** - Your patch won't be accepted if it doesn't have tests.

- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.

- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.

- **Create feature branches** - Don't ask us to pull from your master branch.

- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.

- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting.


## Running Tests

``` bash
$ phpunit
```


**Happy coding**!
15 changes: 15 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# The Apache 2.0 License

Copyright 2015 Steven Maguire <stevenmaguire@gmail.com>

> Licensed under the Apache License, Version 2.0 (the "License");
> you may not use this file except in compliance with the License.
> You may obtain a copy of the License at
>
> http://www.apache.org/licenses/LICENSE-2.0
>
> Unless required by applicable law or agreed to in writing, software
> distributed under the License is distributed on an "AS IS" BASIS,
> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
> See the License for the specific language governing permissions and
> limitations under the License.
65 changes: 65 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# AuthenticJobs Jobs Client

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

This package provides AuthenticJobs Jobs API support for the JobBrander's [Jobs Client](https://github.com/JobBrander/jobs-common).

## Installation

To install, use composer:

```
composer require jobbrander/jobs-authenticjobs
```

## Usage

Usage is the same as Job Branders's Jobs Client, using `\JobBrander\Jobs\Client\Provider\AuthenticJobs` as the provider.

```php
$client = new JobBrander\Jobs\Client\Provider\AuthenticJobs([
'key' => 'YOUR API KEY',
]);

// Search for 200 job listings for 'project manager' in Chicago, IL
$jobs = $client->setKeywords('designer') // Keywords to look for in the title or description of the job posting. Separate multiple keywords with commas. Multiple keywords will be treated as an OR
->setCategory('UI Design') // The id of a job category to limit to. See aj.categories.getList
->setType('Freelance') // The id of a job type to limit to. See aj.types.getList
->setSort('date-posted-asc') // Accepted values are: date-posted-desc (the default) and date-posted-asc
->setCompany('Apple') // Free-text matching against company names. Suggested values are the ids from aj.jobs.getCompanies
->setLocation('Pasadena, CA') // Free-text matching against company location names. Suggested values are the ids from aj.jobs.getLocation
->setTelecommuting(1) // Set to 1 if you only want telecommuting jobs
->setBeginDate(1438819200) // Unix timestamp. Listings posted before this time will not be returned
->setEndDate(1441497600) // Unix timestamp. Listings posted after this time will not be returned
->setPage(2) // The page of listings to return. Defaults to 1.
->setPerPage(20) // The number of listings per page. The default value is 10. The maximum value is 100.
->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.

## Testing

``` bash
$ ./vendor/bin/phpunit
```

## Contributing

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


## Credits

- [Steven Maguire](https://github.com/stevenmaguire)
- [All Contributors](https://github.com/jobbrander/jobs-authenticjobs/contributors)


## License

The Apache 2.0. Please see [License File](https://github.com/jobbrander/jobs-authenticjobs/blob/master/LICENSE) for more information.
40 changes: 40 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "jobbrander/jobs-authenticjobs",
"type": "library",
"description": "Making it simple to integrate your application with Authentic Jobs API.",
"keywords": [
"jobs",
"api client",
"object",
"authenticjobs"
],
"homepage": "https://github.com/JobBrander/jobs-authenticjobs",
"license": "Apache-2.0",
"authors": [
{
"name": "Steven Maguire",
"email": "stevenmaguire@gmail.com",
"homepage": "https://github.com/stevenmaguire"
}
],
"require": {
"php": ">=5.5.0",
"jobbrander/jobs-common": "~1.0"
},
"require-dev": {
"phpunit/phpunit": ">=4.6",
"phpunit/php-code-coverage": "~2.0",
"mockery/mockery": ">=0.9.4",
"squizlabs/php_codesniffer": "~2.0"
},
"autoload": {
"psr-4": {
"JobBrander\\Jobs\\Client\\Providers\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"JobBrander\\Jobs\\Client\\Providers\\Test\\": "tests/src/"
}
}
}
37 changes: 37 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
>
<logging>
<log type="coverage-html"
target="./build/coverage/html"
charset="UTF-8"
highlight="false"
lowUpperBound="35"
highLowerBound="70"/>
<log type="coverage-clover"
target="./build/coverage/log/coverage.xml"/>
</logging>
<testsuites>
<testsuite name="Package Test Suite">
<directory suffix=".php">./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">./</directory>
<exclude>
<directory suffix=".php">./vendor</directory>
<directory suffix=".php">./tests</directory>
</exclude>
</whitelist>
</filter>
</phpunit>
Loading

0 comments on commit c59166b

Please sign in to comment.