PHP code example of jobapis / jobs-usajobs

1. Go to this page and download the library: Download jobapis/jobs-usajobs library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jobapis / jobs-usajobs example snippets


// Add parameters to the query via the constructor
$query = new JobApis\Jobs\Client\Queries\UsajobsQuery([
    'AuthorizationKey' => YOUR_API_KEY
]);

// Add parameters via the set() method
$query->set('Keyword', 'engineering');

// Add parameters via the set() method
$query->set('LocationName', 'Chicago, IL')
    ->set('JobCategoryCode', '1234');

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

// Get a Collection of Jobs
$jobs = $client->getJobs();