PHP code example of metatavu / metamind-client-php

1. Go to this page and download the library: Download metatavu/metamind-client-php 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/ */

    

metatavu / metamind-client-php example snippets


    


onfigure HTTP basic authorization: basicAuth
$config = Metatavu\Metamind\Configuration::getDefaultConfiguration()
    ->setUsername('YOUR_USERNAME')
    ->setPassword('YOUR_PASSWORD');

$apiInstance = new Metatavu\Metamind\Api\MessagesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$body = new \Metatavu\Metamind\Api\Model\Message(); // \Metatavu\Metamind\Api\Model\Message | Payload

try {
    $result = $apiInstance->createMessage($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MessagesApi->createMessage: ', $e->getMessage(), PHP_EOL;
}


{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/metatavu/metamind-client-php.git"
    }
  ],
  "