jedkirby / rightmove-adf
用于Rightmove实时房产数据feed (ADF)的PHP库。
1.1.0
2018-07-16 14:41 UTC
Requires
- php: >=5.4
- ext-curl: *
- frozensheep/synthesize: 1.*
README
Rightmove实时房产数据feed的PHP库。
安装
先决条件
要使用此包,您需要
- 运行PHP 5.4或更高版本
- 使用composer(如果您想遵循安装指南)
- Rightmove将为您提供用于请求的PEM证书/密码和网络ID。您还应有一个分支ID。
请注意,此包的依赖项也将被安装。如果您想在使用之前查看这些依赖项,请检查存储库中的composer.json
文件。
使用Composer安装
使用Composer安装
composer require jedkirby/rightmove-adf
或将以下内容添加到composer.json文件中
"require": { "jedkirby/rightmove-adf" : "1.*" }
用法
使用示例
提供了示例。建议您在继续之前设置其中一个示例,以了解如何与库交互。
- 按照上述说明使用Composer安装此包。
- 为您的项目创建一个目录,例如
public_html
mkdir public_html
- 将示例代码复制到新的
public_html
目录
cp -R vendor/jedkirby/rightmove-adf/examples/ public_html/
- 将配置文件复制到工作版本
cp public_html/config.php.example public_html/config.php
- 使用您的设置编辑配置文件。您需要一个包含RightMove实时数据feed密钥的.pem文件,以及您的网络和分支信息。
- 运行本地Web服务器
cd public_html
php -S localhost:8000
- 从您的浏览器运行示例文件之一(例如
https://:8080/getBranchPropertyList.php
)
可用方法
您在配置中设置的值都将与API期望的值进行核对,如果设置了错误的数据类型,将抛出异常。
支持v1.2.3 API的所有13个端点。
- SendProperty [示例]
- RemoveProperty [示例]
- GetBranchPropertyList [示例]
- AddPremiumListing [示例]
- AddFeaturedProperty [示例]
- RemoveFeaturedProperty [示例]
- GetPropertyPerformance [示例]
- GetBranchPerformance [示例]
- GetBrandEmails [示例]
- GetBranchEmails [示例]
- GetBrandPhoneLeads [示例]
- GetBranchPhoneLeads [示例]
- GetPropertyEmails [示例]
待办事项
- 在发送前添加对必填字段的预发送验证检查。
已知问题
- Rightmove媒体爬虫在Let's Encrypt https下无法工作,只会返回一个MED_00001错误。