PHP code example of mrprompt / imovelweb-sdk

1. Go to this page and download the library: Download mrprompt/imovelweb-sdk library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mrprompt / imovelweb-sdk example snippets


use ImovelWeb\Base\HttpClient as Client;

$token = env('IMOVELWEB_TOKEN');
$environment = env('IMOVELWEB_ENVIRONMENT'); // production | sandbox

$client = new Client($token, $environment);

use ImovelWeb\Application\Authentication;

/* @var $client \ImovelWeb\Base\HttpClient */
$authentication = new Authentication($client);
$authentication->login('CLIENT_ID', 'CLIENT_SECRET');

use ImovelWeb\Application\Authentication;

/* @var $client \ImovelWeb\Base\HttpClient */
$authentication = new Authentication($client);
$authentication->logout('CLIENT_ID', 'CLIENT_SECRET', 'ACCESS_TOKEN');

use ImovelWeb\Anuncios\Anuncios;

/* @var $client \ImovelWeb\Base\HttpClient */
$anuncios = new Anuncios($client);
$anuncios->resumo(string $imobiliaria, array $args = []);
$anuncios->remover(string $imobiliaria, string $anuncio);
$anuncios->info(string $imobiliaria, string $anuncio);
$anuncios->atualizar(string $imobiliaria, string $anuncio, array $detalhes = []);
$anuncios->associar(string $imobiliaria, string $origem, string $destino);
$anuncios->qualidade(string $imobiliaria, string $anuncio);
$anuncios->status(string $imobiliaria, string $anuncio);

use ImovelWeb\Anuncios\Lancamentos;

/* @var $client \ImovelWeb\Base\HttpClient */
$lancamentos = new Lancamentos($client);
$lancamentos->resumo(string $imobiliaria, string $lancamento);
$lancamentos->info(string $imobiliaria, string $lancamento);
$lancamentos->atualizar(string $imobiliaria, string $lancamento, array $detalhes = []);

use ImovelWeb\Imobiliarias\Imobiliarias;

/* @var $client \ImovelWeb\Base\HttpClient */
$imobiliarias = new Imobiliarias($client);
$imobiliarias->listar();
$imobiliarias->desvincular(string $imobiliaria);
$imobiliarias->ftp(string $imobiliaria);
$imobiliarias->qualidade(string $imobiliaria);

use ImovelWeb\Vendas\Vendas;

/* @var $client \ImovelWeb\Base\HttpClient */
$vendas = new Vendas($client);
$vendas->listar();
$vendas->grade(string $imobiliaria);

use ImovelWeb\Configuracao\Callbacks;

/* @var $client \ImovelWeb\Base\HttpClient */
$callbacks = new Callbacks($client);
$callbacks->listar();
$callbacks->atualizar(array $configuracoes);