PHP code example of plin-code / job-boards-workable
1. Go to this page and download the library: Download plin-code/job-boards-workable 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/ */
plin-code / job-boards-workable example snippets
use GuzzleHttp\Client;
use GuzzleHttp\Psr7\HttpFactory;
use PlinCode\JobBoards\Http\HttpClient;
use PlinCode\JobBoards\Workable\WorkableClient;
$http = new HttpClient(new Client, new HttpFactory);
$client = new WorkableClient($http);
$jobs = $client->fetchJobsForCompany('acme'); // list<JobPostingDTO>
$name = $client->validateSlug('acme'); // ?string, the account name
$about = $client->fetchCompanyDescription('acme'); // ?string
use PlinCode\JobBoards\Workable\WorkableClient;
$client = app(WorkableClient::class);
foreach ($client->fetchJobsForCompany('acme') as $job) {
JobPosting::updateOrCreate(
['external_id' => $job->externalId],
$job->toArray(),
);
}