dwmsw/genesislive
最新稳定版本:2.0.0
Composer 安装命令:
composer require dwmsw/genesislive
包简介
Genesis API Wrapper
README 文档
README
Description
dwmsw/genesislive is a library for interacting with the Radical Solutions Genesis API.
It aims to make interacting with the API as easy as possible.
To Do
- Add more tests!
- Get an API key to use with tests so we don't have to check for 400 errors form the API
Usage
Usage is pretty easy, create a new instance of the class you require and then pass in the parameters required.
Search
require('vendor/autoload.php'); $api = new dwmsw\genesislive\Search('YOUR API KEY HERE'); // Set parameters $params['division'] = 'Sales'; $params['priceto'] = 500000; $params['type'] = 'House'; $params['BedroomsFrom'] = 3; $params['BedroomsTo'] = 4; // Make request $api->setQueryString($params); $api->doSearch(); $api->sendRequest(); // Get properties $properties = $api->getProperties();
Single Property
require('vendor/autoload.php'); $api = new dwmsw\genesislive\Single('YOUR API KEY HERE'); // Set parameters $params['PropertyID'] = $_GET['PropertyID']; // Make request $api->setQueryString($params); $api->doSearch(); $api->sendRequest(); // Get property data $property = $api->getProperty();
Images
// Grab the URL $src = dwmsw\genesislive\Image::getImageURL('MediaKey', 'Width', 'Height'); // Print the Image printf('<img src="%s" alt="">', $src);
Getting Involved
- Open an issue with a feature you'd like
- Make a PR
- Write any tests that may be missing!
统计信息
- 总下载量: 31
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2014-10-24