jobbrander/jobs-indeed

This package is abandoned and no longer maintained. The author suggests using the jobapis/jobs-indeed package instead.

Making it simple to integrate your application with Indeed Jobs API.

0.4.0 2015-09-01 20:32 UTC

README

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads

This package provides Indeed Jobs API support for the JobBrander's Jobs Client.

Installation

To install, use composer:

composer require jobbrander/jobs-indeed

Usage

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

$client = new JobBrander\Jobs\Client\Provider\Indeed([
    'publisher' => 'YOUR INDEED PUBLISHER ID',
    'v' => 2, // Optional. Default is 2.
    'highlight' => 0,
]);

$jobs = $client
    ->setKeyword('project manager')                 // Query. By default terms are ANDed. To see what is possible, use the [advanced search page](http://www.indeed.com/advanced_search) to perform a search and then check the url for the q value.
    ->setFormat('json')                             // Format. Which output format of the API you wish to use. The options are "xml" and "json". If omitted or invalid, the json format is used.
    ->setCity('Chicago')                            // City.
    ->setState('IL')                                // State.
    ->setLocation('Chicago, IL')                    // Location. Use a postal code or a "city, state/province/region" combination. Will overwrite any changes made using setCity and setState
    ->setSort('date')                               // Sort by relevance or date. Default is relevance.
    ->setRadius('100')                              // Distance from search location ("as the crow flies"). Default is 25.
    ->setSiteType('jobsite')                        // Site type. To show only jobs from job boards use "jobsite". For jobs from direct employer websites use "employer".
    ->setJobType('fulltime')                        // Job type. Allowed values: "fulltime", "parttime", "contract", "internship", "temporary".
    ->setPage(2)                                    // Start results at this result number, beginning with 0. Default is 0.
    ->setCount(200)                                 // Maximum number of results returned per query. Default is 10
    ->setDaysBack(10)                               // Number of days back to search.
    ->filterDuplicates(false)                       // Filter duplicate results. 0 turns off duplicate job filtering. Default is 1.
    ->includeLatLong(true)                          // If latlong=1, returns latitude and longitude information for each job result. Default is 0.
    ->setCountry('us')                              // Search within country specified. Default is us.
    ->setChannel('channel-one')                     // Channel Name: Group API requests to a specific channel
    ->setUserIp($_SERVER['REMOTE_ADDR'])            // The IP number of the end-user to whom the job results will be displayed.
    ->setUserAgent($_SERVER['HTTP_USER_AGENT'])     // The User-Agent (browser) of the end-user to whom the job results will be displayed.
    ->getJobs();

The getJobs method will return a Collection of Job objects.

Testing

$ ./vendor/bin/phpunit

Contributing

Please see CONTRIBUTING for details.

Credits

License

The Apache 2.0. Please see License File for more information.