cameronredlet / onthemarket-adf
On the Market 实时房地产数据馈送(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-25 06:22:25 UTC
README
On the Market 实时房地产数据馈送的 PHP 库。
安装
先决条件
要使用此包,您需要
- 运行 PHP 5.4 或更高版本
- 使用 composer(如果您想遵循安装指南)
- On the Market 将为您提供一个用于请求的 PEM 证书/密码和网络 ID。您还应该有一个分支 ID。
请注意,此包的依赖项也将被安装。如果您在使用之前想查看这些依赖项,请检查存储库中的 composer.json
文件。
使用 Composer 安装
使用 Composer 安装
composer require cameronredlet/onthemarket-adf
或将它添加到 composer.json 文件中
"require": { "cameronredlet/onthemarket-adf" : "1.*" }
用法
使用示例
提供了示例。建议您在继续之前设置其中一个示例,以了解如何与库进行交互。
- 使用上述方法使用 composer 安装此包。
- 为您的项目创建一个目录,例如
public_html
mkdir public_html
- 将示例代码复制到新的
public_html
目录
cp -R vendor/cameronredlet/onthemarket-adf/examples/ public_html/
- 将配置文件复制到工作版本
cp public_html/config.php.example public_html/config.php
- 使用您的设置编辑配置文件。您需要一个包含实时数据馈送密钥的 On the Market .pem 文件,以及您的网络和分支信息。
- 运行本地 web 服务器
cd public_html
php -S localhost:8000
- 通过浏览器运行示例文件之一(例如
https://:8080/getBranchPropertyList.php
)
可用方法
您在配置中设置的所有值都将与 API 期望的值进行核对,如果设置错误的数据类型,将返回异常。
支持所有 13 个 v1.2.3 API 端点。
- SendProperty [示例]
- RemoveProperty [示例]
- GetBranchPropertyList [示例]
- AddPremiumListing [示例]
- AddFeaturedProperty [示例]
- RemoveFeaturedProperty [示例]
- GetPropertyPerformance [示例]
- GetBranchPerformance [示例]
- GetBrandEmails [示例]
- GetBranchEmails [示例]
- GetBrandPhoneLeads [示例]
- GetBranchPhoneLeads [示例]
- GetPropertyEmails [示例]
待办事项
- 添加一个预发送验证检查,以确保所需字段。
已知问题
- 在市场上的媒体爬虫在 https 上无法工作,并且只会返回一个 MED_00001 错误。
请将任何问题提交到 Github 仓库。