soomedia / floorplanner-v2
Floorplanner API v2 client for PHP
Installs: 2 549
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: ^8.1
- ext-json: *
- guzzlehttp/guzzle: ^7.0.1
Requires (Dev)
- phpunit/phpunit: ^9.0
README
Floorplanner v2
PHP client for the Floorplanner API v2.
Requirements
The API client requires PHP version 8.1.
Installation
Use Composer to install this package:
composer require soomedia/floorplanner-v2
Usage
The client is a simple wrapper for the Floorplanner API and you can use is as you would the API:
require 'vendor/autoload.php'; $client = new \SooMedia\Floorplanner\FloorplannerClient('your_api_key'); $response = $client->projects()->create([ 'project' => [ 'name' => 'My new house', 'description' => 'This is my first floor plan', 'external_identifier' => 'ID3344', 'project_template_attributes' => [ 'template_id' => 10, ], ], ]); /* [ 'id' => 170280, 'user_id' => 103, 'public' => false, 'name' => 'My new house', 'description' => 'This is my first floor plan', 'project_url' => '2fv03b', 'created_at' => '2017-03-23T15:48:19.000Z', 'updated_at' => '2017-03-23T15:48:19.000Z', 'enable_autosave' => false, 'external_identifier' => 'ID3344', 'exported_at' => null, ] */
If you want to change the base URI used, you can supply that as the second argument for the client's constructor:
$client = new \SooMedia\Floorplanner\FloorplannerClient( 'your_api_key', 'https://sandbox.floorplanner.com/' );
Implemented endpoints
Below is an overview of the implementation of the API endpoints and from which version the implementation is available.