PHP code example of chrgriffin / wave-api

1. Go to this page and download the library: Download chrgriffin/wave-api 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/ */

    

chrgriffin / wave-api example snippets




use ChrGriffin\WaveApi\Client as WaveClient;

$wave = new WaveClient('my-api-key');
$response = $wave->analyze('my-url');

$wave = new WaveClient('my-api-key', [
    'viewportwidth' => 1440,
    'reporttype'    => 2,
    'format'        => 'json'
]);

$response = $wave->analyze('my-url', [
    'viewportwidth' => 1440,
    'reporttype'    => 2,
    'format'        => 'json'
]);

$wave->setViewportwidth(1440)
    ->setReporttype(2)
    ->setFormat('json')
    ->analyze('my-url);