Download the PHP package mihaikelemen/vaultre without Composer

On this page you can find all versions of the php package mihaikelemen/vaultre. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package vaultre

VaultRe API wrapper

Small utility, inspired by the official examples, to handle API calls on VaultRE endpoints.

Installation

You can install this library with Composer, by running composer require mihaikelemen/vaultre

Usage

To access a specific data type (eg. attribute) such as: properties, advertising, categories, etc., you need to use the setAtrribute() method. How you know what attribute to use? Is simple: for example check this API endpoints /advertising/suppliers or /contacts/{id}/context. The attribute for the first example is advertising and for the second is contacts.

The second part of the endpoint (what is after the attribute) is the action that needs to be performed: suppliers or {id}/context

EXAMPLES:

use MihaiKelemen\VaultRe\VaultRe

require_once 'vendor/autoload.php';

$valutre = new ValutRe(API_KEY, TOKEN);
$valutre->setAttribute('properties')
->fetch('123');

// access the data
if ($valutre->isSuccess()) {
    $property = $valutre->getResponse();
}
use MihaiKelemen\VaultRe\VaultRe

require_once 'vendor/autoload.php';

$valutre = new ValutRe(API_KEY, TOKEN);
$valutre->setAttribute('properties')
->setPageSize(100)
->fetch('residential/sale');

$properties = $api->properties();

use MihaiKelemen\VaultRe\VaultRe;

require_once 'vendor/autoload.php';

function nextPageNumber(array $nav=[])
{
    $url = $nav['navigation']['next'];
    if (is_null($url)) {
        return 0;
    }
    parse_str(parse_url($url, PHP_URL_QUERY), $result);
    return $result['page'];
}

$valutre = new ValutRe(API_KEY, TOKEN);
$valutre->setAttribute('properties')
->setPageSize(100)
->fetch('residential/sale');

if ($valutre->isSuccess()) {

    $page = nextPageNumber($valutre->pagination());

    // code here to process the properties returned by VaultRe (eg. $vaultre->properties())

    while ($page > 0) {

        $valutre->setPage($page)
        ->fetch('residential/sale');

        if ($valutre->isSuccess()) {
            // code here to process the properties returned by VaultRe (eg. $vaultre->properties())
            $page = nextPageNumber($valutre->pagination());
        } else {
            die($valutre->errors());
        }

    }
} else {
    die($valutre->errors());
}

use MihaiKelemen\VaultRe\VaultRe;

require_once 'vendor/autoload.php';

$valutre = new ValutRe(API_KEY, TOKEN);
$valutre->setAttribute('properties')
->update('123/photos', [
    "photo" => "string (binary data)",
    "caption" => "string",
    "published" => true|false,
    "type" => "Photograph|Floorplan"
]);

use MihaiKelemen\VaultRe\VaultRe;

require_once 'vendor/autoload.php';

$valutre = new ValutRe(API_KEY, TOKEN);
$valutre->setAttribute('properties')
->delete('123');

Actions that can be performed on an attribute:fetch, update, delete, add. For the update and add methods you need to pass a second argument which is the payload that needs to be sent over to VaultRe.

Links

Todo


All versions of vaultre with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
guzzlehttp/guzzle Version ^7.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mihaikelemen/vaultre contains the following files

Loading the files please wait ....