PHP code example of awd-studio / novaposhta

1. Go to this page and download the library: Download awd-studio/novaposhta 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/ */

    

awd-studio / novaposhta example snippets




use NP\NP;

$response = NP::init($key)->sendWith('Address', 'searchSettlements', [
    'StreetName'    => 'Шев',
    'SettlementRef' => 'e715719e-4b33-11e4-ab6d-005056801329',
    'Limit'         => 10,
]);



use NP\NP;

$np = NP::init(['key' => 'yourApiKey', 'driver' => $yourDriver]);

// Simple usage methods:
$np->with('modelName', 'methodName', $data);
$response = $np->send();

// Or more simple:
$response = $np->sendWith('modelName', 'methodName', $data);