wasico / sdk-php
Wasi SDK PHP
Installs: 10 438
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 1
Forks: 2
Open Issues: 1
Type:sdk
Requires
- php: >=7.1.0
- dev-master
- v0.6.06
- v0.6.05
- v0.6.03
- v0.6.01
- v0.5.22
- v0.5.21
- v0.5.20
- v0.5.19.2
- v0.5.19
- v0.5.18
- v0.5.17
- v0.5.16
- v0.5.15
- v0.5.14
- v0.5.13
- v0.5.12
- v0.5.11
- v0.5.10
- v0.5.9
- v0.5.8
- v0.5.7
- v0.5.6
- v0.5.5
- v0.5.4
- v0.5.3
- v0.5.2
- v0.5.1
- v0.5.0
- v0.4.5
- v0.4.4
- v0.4.1
- v0.4.0
- v0.3.6
- v0.3.4
- v0.3.3
- v0.3.1
- v0.3.0
- v0.2.9
- v0.2.8
- v0.2.7
- v0.2.6
- v0.2.4
- v0.2.1
- v0.1.9
- v0.1.5
- v0.1.0
- v0.0.3
- v0.0.2
- v0.0.1
- dev-feature/createAndUpdate
This package is not auto-updated.
Last update: 2025-04-10 00:37:33 UTC
README
You can sign up for a Wasi account at https://wasi.co and get your id_company and wasi_token
Requirements
PHP 7.1.* and later.
Installation
Composer
You can install the bindings via Composer. Run the following command:
composer require wasico/sdk-php
To use the bindings, use Composer's autoload:
require_once('vendor/autoload.php');
Or add manually to your composer.json file for constant update
"wasico/sdk-php": ">=0.0.1"
First configuration
Set your configuration only one time in execution time
\Wasi\SDK\Configuration::set([ 'v' => 1, //API version here 'id_company' => 123456, //Your id_company here 'wasi_token' => 'AbCd_eFgH_IjKl_MnOp', //Your WasiToken here ]);
Usage
Use Wasi models (\Wasi\SDK\Models) for get Objects of the API
Find one element
#Replace 123456 with the id_property $property = \Wasi\SDK\Models\Property::find(123456);
Filter and get elements
#Use API filters in the 'where' method $properties = \Wasi\SDK\Models\Property::where('title', 'Hotel')->get();
Create an element
$customer = new \Wasi\SDK\Models\Customer(); $customer->id_user = 123; $customer->id_country = 1; $customer->id_region = 26; $customer->id_city = 63; $customer->first_name = "Jose W"; $customer->save() #Now you can get id_client: $id_client = $customer->id_client;
Update an element
$customer = \Wasi\SDK\Models\Customer::find(4321); $customer->last_name = 'Capera'; $customer->save()