composer require mrprompt/imovelweb-sdk
Prepare o cliente HTTP com sua credencial e ambiente.
use ImovelWeb\Base\HttpClient as Client;
$token = env('IMOVELWEB_TOKEN');
$environment = env('IMOVELWEB_ENVIRONMENT'); // production | sandbox
$client = new Client($token, $environment);
Login
use ImovelWeb\Application\Authentication;
/* @var $client \ImovelWeb\Base\HttpClient */
$authentication = new Authentication($client);
$authentication->login('CLIENT_ID', 'CLIENT_SECRET');
Logout
use ImovelWeb\Application\Authentication;
/* @var $client \ImovelWeb\Base\HttpClient */
$authentication = new Authentication($client);
$authentication->logout('CLIENT_ID', 'CLIENT_SECRET', 'ACCESS_TOKEN');
Anúncios
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);
Lançamentos
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 = []);
Anúncios
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);
Vendas
use ImovelWeb\Vendas\Vendas;
/* @var $client \ImovelWeb\Base\HttpClient */
$vendas = new Vendas($client);
$vendas->listar();
$vendas->grade(string $imobiliaria);
Callbacks
use ImovelWeb\Configuracao\Callbacks;
/* @var $client \ImovelWeb\Base\HttpClient */
$callbacks = new Callbacks($client);
$callbacks->listar();
$callbacks->atualizar(array $configuracoes);