-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
255 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
/** | ||
* This file contains the Address Group model class. | ||
* | ||
* @package Frozensheep\RightmoveADF | ||
* @author Jacob Wyke <jacob@frozensheep.com> | ||
* @license MIT | ||
* | ||
*/ | ||
|
||
namespace Frozensheep\RightmoveADF\Groups; | ||
|
||
use Frozensheep\RightmoveADF\Groups\GroupInterface; | ||
use Frozensheep\Synthesize\Synthesizer; | ||
|
||
/** | ||
* Address Group Class | ||
* | ||
* Class to handle Address group. | ||
* | ||
* @package Frozensheep\RightmoveADF | ||
* | ||
*/ | ||
class OverseasAddress implements GroupInterface, \JsonSerializable { | ||
|
||
use Synthesizer; | ||
|
||
protected $arrSynthesize = array( | ||
'country_code' => array('type' => 'string', 'required' => true, 'max' => 2), | ||
'region' => array('type' => 'string', 'max' => 120), | ||
'sub_region' => array('type' => 'string', 'max' => 120), | ||
'town_city' => array('type' => 'string', 'max' => 120), | ||
'latitude' => array('type' => 'float', 'max' => 90.0, 'min' => -90.0), | ||
'longitude' => array('type' => 'float', 'max' => 180.0, 'min' => -180.0) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
/** | ||
* This file contains the Network Group model class. | ||
* | ||
* @package Frozensheep\RightmoveADF | ||
* @author Jacob Wyke <jacob@frozensheep.com> | ||
* @license MIT | ||
* | ||
*/ | ||
|
||
namespace Frozensheep\RightmoveADF\Groups; | ||
|
||
use Frozensheep\RightmoveADF\Groups\GroupInterface; | ||
use Frozensheep\Synthesize\Synthesizer; | ||
|
||
/** | ||
* Network Group Class | ||
* | ||
* Class to handle Network group. | ||
* | ||
* @package Frozensheep\RightmoveADF | ||
* | ||
*/ | ||
class OverseasBranch implements GroupInterface, \JsonSerializable { | ||
|
||
use Synthesizer; | ||
|
||
protected $arrSynthesize = array( | ||
'branch_id' => array('type' => 'int', 'required' => true) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
/** | ||
* This file contains the Details Group model class. | ||
* | ||
* @package Frozensheep\RightmoveADF | ||
* @author Jacob Wyke <jacob@frozensheep.com> | ||
* @license MIT | ||
* | ||
*/ | ||
|
||
namespace Frozensheep\RightmoveADF\Groups; | ||
|
||
use Frozensheep\RightmoveADF\Groups\GroupInterface; | ||
use Frozensheep\Synthesize\Synthesizer; | ||
use Frozensheep\RightmoveADF\Values\Parkings; | ||
use Frozensheep\RightmoveADF\Values\OutsideSpaces; | ||
use Frozensheep\RightmoveADF\Values\AreaUnits; | ||
use Frozensheep\RightmoveADF\Values\EntranceFloors; | ||
use Frozensheep\RightmoveADF\Values\Conditions; | ||
use Frozensheep\RightmoveADF\Values\Accessibilities; | ||
use Frozensheep\RightmoveADF\Values\Heatings; | ||
use Frozensheep\RightmoveADF\Values\Furnishings; | ||
use Frozensheep\RightmoveADF\Values\CommercialuseClasses; | ||
use Frozensheep\RightmoveADF\Groups\Room; | ||
|
||
/** | ||
* Details Group Class | ||
* | ||
* Class to handle Details group. | ||
* | ||
* @package Frozensheep\RightmoveADF | ||
* | ||
*/ | ||
class OverseasDetails implements GroupInterface, \JsonSerializable { | ||
|
||
use Synthesizer; | ||
|
||
protected $arrSynthesize = array( | ||
'summary' => array('type' => 'string', 'required' => true, 'max' => 1000), | ||
'description' => array('type' => 'string', 'required' => true, 'max' => 32000), | ||
'features' => array('type' => 'objectarray', 'class' => 'Frozensheep\Synthesize\Type\StringObject', 'max' => 10), | ||
'bedrooms' => array('type' => 'int', 'required' => true, 'min' => 0), | ||
'bathrooms' => array('type' => 'int', 'min' => 0), | ||
'reception_rooms' => array('type' => 'int', 'min' => 0), | ||
'parking' => array('type' => 'objectarray', 'class' => 'Frozensheep\RightmoveADF\Values\Parkings'), | ||
'outside_space' => array('type' => 'objectarray', 'class' => 'Frozensheep\RightmoveADF\Values\OutsideSpaces'), | ||
'year_built' => array('type' => 'int'), | ||
'internal_area' => array('type' => 'number'), | ||
'internal_area_unit' => array('type' => 'enum', 'class' => 'Frozensheep\RightmoveADF\Values\AreaUnits'), | ||
'land_area' => array('type' => 'number'), | ||
'land_area_unit' => array('type' => 'enum', 'class' => 'Frozensheep\RightmoveADF\Values\AreaUnits'), | ||
'floors' => array('type' => 'number') | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
/** | ||
* This file contains the Price Group model class. | ||
* | ||
* @package Frozensheep\RightmoveADF | ||
* @author Jacob Wyke <jacob@frozensheep.com> | ||
* @license MIT | ||
* | ||
*/ | ||
|
||
namespace Frozensheep\RightmoveADF\Groups; | ||
|
||
use Frozensheep\RightmoveADF\Groups\GroupInterface; | ||
use Frozensheep\Synthesize\Synthesizer; | ||
use Frozensheep\RightmoveADF\Values\PriceQualifiers; | ||
use Frozensheep\RightmoveADF\Values\RentFrequencies; | ||
use Frozensheep\RightmoveADF\Values\TenureTypes; | ||
|
||
/** | ||
* Price Group Class | ||
* | ||
* Class to handle Price group. | ||
* | ||
* @package Frozensheep\RightmoveADF | ||
* | ||
*/ | ||
class OverseasPrice implements GroupInterface, \JsonSerializable { | ||
|
||
use Synthesizer; | ||
|
||
protected $arrSynthesize = array( | ||
'price' => array('type' => 'number', 'required' => true, 'min' => 1), | ||
'os_price_qualifier' => array('type' => 'enum', 'class' => 'Frozensheep\RightmoveADF\Values\PriceQualifiers') | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
/** | ||
* This file contains the Property Group model class. | ||
* | ||
* @package Frozensheep\RightmoveADF | ||
* @author Jacob Wyke <jacob@frozensheep.com> | ||
* @license MIT | ||
* | ||
*/ | ||
|
||
namespace Frozensheep\RightmoveADF\Groups; | ||
|
||
use Frozensheep\RightmoveADF\Groups\GroupInterface; | ||
use Frozensheep\Synthesize\Synthesizer; | ||
use Frozensheep\RightmoveADF\Groups\Address; | ||
use Frozensheep\RightmoveADF\Groups\Price; | ||
use Frozensheep\RightmoveADF\Groups\Details; | ||
use Frozensheep\RightmoveADF\Groups\Principal; | ||
use Frozensheep\RightmoveADF\Values\PropertyTypes; | ||
use Frozensheep\RightmoveADF\Values\Statuses; | ||
use Frozensheep\RightmoveADF\Values\LetTypes; | ||
|
||
/** | ||
* Property Group Class | ||
* | ||
* Class to handle Property group. | ||
* | ||
* @package Frozensheep\RightmoveADF | ||
* | ||
*/ | ||
class OverseasProperty implements GroupInterface, \JsonSerializable { | ||
|
||
use Synthesizer; | ||
|
||
protected $arrSynthesize = array( | ||
'agent_ref' => array('type' => 'string', 'required' => true, 'max' => 80), | ||
'published' => array('type' => 'boolean', 'required' => true), | ||
'property_type' => array('type' => 'enum', 'class' => 'Frozensheep\RightmoveADF\Values\PropertyTypes', 'required' => true), | ||
'os_status' => array('type' => 'enum', 'class' => 'Frozensheep\RightmoveADF\Values\Statuses', 'required' => true), | ||
'new_home' => array('type' => 'boolean'), | ||
'address' => array('type' => 'object', 'class' => 'Frozensheep\RightmoveADF\Groups\OverseasAddress', 'required' => true), | ||
'price_information' => array('type' => 'object', 'class' => 'Frozensheep\RightmoveADF\Groups\OverseasPrice', 'required' => true), | ||
'details' => array('type' => 'object', 'class' => 'Frozensheep\RightmoveADF\Groups\OverseasDetails', 'required' => true), | ||
'media' => array('type' => 'objectarray', 'class' => 'Frozensheep\RightmoveADF\Groups\Media', 'max' => 999), | ||
'create_date' => array('type' => 'datetime', 'format' => 'd-m-Y H:i:s', 'autoinit' => false), | ||
'update_date' => array('type' => 'datetime', 'format' => 'd-m-Y H:i:s', 'autoinit' => false) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
/** | ||
* This file contains the Send Property Request class. | ||
* | ||
* @package Frozensheep\RightmoveADF | ||
* @author Jacob Wyke <jacob@frozensheep.com> | ||
* @license MIT | ||
* | ||
*/ | ||
|
||
namespace Frozensheep\RightmoveADF\Request; | ||
|
||
use Frozensheep\RightmoveADF\Request\RequestBase; | ||
use Frozensheep\RightmoveADF\Groups\Network; | ||
use Frozensheep\RightmoveADF\Groups\Branch; | ||
use Frozensheep\RightmoveADF\Groups\Property; | ||
|
||
/** | ||
* Send Property Class | ||
* | ||
* Class for the send property request. | ||
* | ||
* @package Frozensheep\RightmoveADF | ||
* | ||
*/ | ||
class SendOverseasProperty extends RequestBase { | ||
|
||
/** | ||
* @var string $_strLiveURL The live request URL. | ||
*/ | ||
protected $_strLiveURL = 'https://adfapi.rightmove.co.uk/v1/property/overseassendpropertydetails'; | ||
|
||
/** | ||
* @var string $_strTestURL The test request URL. | ||
*/ | ||
protected $_strTestURL = 'https://adfapi.adftest.rightmove.com/v1/property/overseassendpropertydetails'; | ||
|
||
/** | ||
* @var array $arrSynthesize The synthesize array. | ||
*/ | ||
protected $arrSynthesize = array( | ||
'network' => array('type' => 'object', 'class' => 'Frozensheep\RightmoveADF\Groups\Network', 'required' => true), | ||
'branch' => array('type' => 'object', 'class' => 'Frozensheep\RightmoveADF\Groups\OverseasBranch', 'required' => true), | ||
'property' => array('type' => 'object', 'class' => 'Frozensheep\RightmoveADF\Groups\OverseasProperty', 'required' => true) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters