oveleon / contao-propstack-api-bundle
Propstack API Controller for Contao.
Installs: 60
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:contao-bundle
Requires
- php: ^7.4 || ^8.0
- contao/core-bundle: ^4.9
- symfony/property-access: >=5.1
Requires (Dev)
- contao/manager-plugin: ^2.0
Conflicts
- contao/core: *
- contao/core-bundle: 4.4.1
- contao/manager-plugin: <2.0 || >=3.0
README
This extension serves as a bridge between Contao and the Propstack API. You can find the documentation for Propstack here. A Propstack API key is required for use.
- Access to the API can be protected
- API calls can be made both via GET (protected) and directly via PHP (unprotected)
- In-build parameter checking: only allowed parameters are passed to the API to prevent errors
Endpoints:
All currently available endpoints can be viewed here.
Example (GET):
https://example.com/api/propstack/units?key=contao_api_key
// Show all routes
https://example.com/api/propstack/help?key=contao_api_key
Example (PHP):
$objUnits = new UnitController(); $objUnits->setFormat(PropstackController::FORMAT_JSON); $units = $objUnits->read($parameters); $units = $objUnits->readOne($id); $units = $objUnits->edit($id, $parameters); $units = $objUnits->create($parameters); $units = $objUnits->delete($id); // Create a unit with custom fields $objUnits->setCustomFields(['my_custom_field']); $units = $objUnits->create([ 'title' => 'My Unit', 'marketing_type' => 'BUY', 'object_type' => 'LIVING', 'rs_type' => 'APARTMENT', 'custom_fields' => [ 'my_custom_field' => '123' ] ]);