Wasi SDK PHP
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
LICENSE
README.md
composer.json

README.md

Wasi SDK PHP

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();