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