使您的应用程序与Craigslist的职位搜索RSS订阅集成变得简单。

0.1.0 2017-01-12 21:11 UTC

This package is auto-updated.

Last update: 2024-08-29 04:03:38 UTC


README

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

本软件包为Craigslist职位RSS订阅提供了对Jobs Common的支持。

安装

要安装,请使用composer

composer require jobapis/jobs-craigslist

用法

创建一个Query对象并通过构造函数添加所有您想要的参数。

// Add parameters to the query via the constructor
$query = new JobApis\Jobs\Client\Queries\CraigslistQuery();

或者通过“set”方法。所有在Indeed文档中记录的参数都可以添加。

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

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

// Add parameters via the set() method
$query->set('location', 'chicago')
    ->set('searchNearby', '1');

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

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

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

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

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

测试

$ ./vendor/bin/phpunit

贡献

有关详细信息,请参阅CONTRIBUTING

鸣谢

许可协议

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