jobapis/jobs-careercast

简化您将应用程序与Careercast的职位RSS源集成的过程。

1.0.1 2016-10-07 00:00 UTC

This package is auto-updated.

Last update: 2024-08-29 04:26:39 UTC


README

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

此包为CareerCast职位提供对Jobs Common项目的支持。

安装

要安装,请使用composer

composer require jobapis/jobs-careercast

用法

创建一个查询对象,并通过构造函数添加您希望的所有参数。

// Add parameters to the query via the constructor
$query = new JobApis\Jobs\Client\Queries\CareercastQuery([
    'keyword' => 'engineering'
]);

或者通过“set”方法。所有已记录的参数都可以添加。

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

如果您愿意,甚至可以链式调用它们。

// Add parameters via the set() method
$query->set('company', 'General Electric')
    ->set('page', '2');

然后将查询对象注入提供者。

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

然后调用“getJobs”方法以检索结果。

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

这将返回一个Collection集合,包含Job对象。

测试

$ ./vendor/bin/phpunit

贡献

有关详细信息,请参阅CONTRIBUTING

鸣谢

许可证

Apache 2.0。有关更多信息,请参阅许可证文件