propertywindow/client
Composer 安装命令:
composer require propertywindow/client
包简介
Client for property window agents
README 文档
README
PHP Client for property window agent websites
Installation
Before anything, you need to make sure you have Composer properly setup in your environment.
Go to project root in your console
If you don't have a composer.json in your project yet:
$ composer initInclude this repository
$ composer require propertywindow/client
Setup
Setup client with authentication details
use PropertyWindow\Client;
$propertyWindow = new Client('token');
Usage
- Get property
$property = $propertyWindow->getProperty('id');
$id = $property->getId();
$subType = $property->getSubType()->getName();
$terms = $property->getTerms()->getName();
$street = $property->getStreet();
$houseNumber = $property->getHouseNumber();
$postcode = $property->getPostcode();
$city = $property->getCity();
$country = $property->getCountry();
$price = $property->getPrice();
$showPrice = $property->getTerms()->isShowPrice();
$soldPrice = $property->getSoldPrice();
$lat = $property->getLat();
$lng = $property->getLng();
$online = $property->isOnline();
$archived = $property->isArchived();
- Get properties
$properties = $propertyWindow->getProperties();
foreach ($properties as $property) {
$id = $property->getId();
$subType = $property->getSubType()->getName();
$terms = $property->getTerms()->getName();
$street = $property->getStreet();
$houseNumber = $property->getHouseNumber();
$postcode = $property->getPostcode();
$city = $property->getCity();
$country = $property->getCountry();
$price = $property->getPrice();
$showPrice = $property->getTerms()->isShowPrice();
$soldPrice = $property->getSoldPrice();
$lat = $property->getLat();
$lng = $property->getLng();
$online = $property->isOnline();
$archived = $property->isArchived();
}
- Get type
$type = $propertyWindow->getType('id');
$id = $type->getId();
$type = $type->getName();
- Get types
$types = $propertyWindow->getTypes();
foreach ($types as $type) {
$id = $type->getId();
$type = $type->getName();
}
- Get subtype
$subType = $propertyWindow->getSubType('id');
$id = $subType->getId();
$subType = $subType->getName();
$typeId = $subType->getType()->getId();
$type = $subType->getType()->getName();
- Get subtypes
$subTypes = $propertyWindow->getSubTypes();
foreach ($subTypes as $subType) {
$id = $subType->getId();
$subType = $subType->getName();
$typeId = $subType->getType()->getId();
$type = $subType->getType()->getName();
}
- Get term
$term = $propertyWindow->getTerm('id');
$id = $term->getId();
$type = $term->getName();
$showPrice = $term->isShowPrice();
- Get terms
$terms = $propertyWindow->getTerms();
foreach ($terms as $term) {
$id = $term->getId();
$term = $term->getName();
$showPrice = $term->isShowPrice();
}
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-02-27

