jobbrander/jobs-authenticjobs

使您的应用程序与Authentic Jobs API集成变得简单。

0.1.1 2015-08-10 17:00 UTC

This package is not auto-updated.

Last update: 2024-09-14 16:29:30 UTC


README

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

此软件包为JobBrander的Jobs客户端提供了AuthenticJobs Jobs API支持。

安装

要安装,请使用composer

composer require jobbrander/jobs-authenticjobs

使用方法

使用方法与Job Branders的Jobs客户端相同,使用\JobBrander\Jobs\Client\Provider\AuthenticJobs作为提供者。

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

// Search for 200 job listings for 'project manager' in Chicago, IL
$jobs = $client->setKeyword('designer') // Keyword(s) 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
    ->setCity('Pasadena')          // Free-text matching against company location names. Suggested values are the ids from aj.jobs.getLocation
    ->setState('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.
    ->setCount(20)                 // The number of listings per page. The default value is 10. The maximum value is 100.
    ->getJobs();

getJobs方法将返回一个集合,其中包含Job对象。

测试

$ ./vendor/bin/phpunit

贡献

请参阅CONTRIBUTING以获取详细信息。

鸣谢

许可证

Apache 2.0。请参阅许可证文件以获取更多信息。