paravibe/perfops

API layer for Perfops

1.0 2019-11-01 15:23 UTC

This package is auto-updated.

Last update: 2024-10-29 05:41:04 UTC


README

PerfOps API PHP wrapper

Provides simple wrapper for PerfOps.net API.

Total Downloads

Examples

  1. Resolve a DNS record.
$client = new Client();
$client->setToken('YOUR_TOKEN');

$request = new Request($client);
$request->attachBody([
    "target" => "google.com",
    "param" => "A",
    "dnsServer" => "8.8.8.8",
    "nodes" => "",
    "location" => "Germany",
    "limit" => "1"
]);

$response = $request->request('/run/dns-resolve');
$id = json_decode($response->getBody());
  1. Return full DNS performance results under a test ID.
$request = new Request($client);
$response = $request->request('/run/dns-resolve/' . $id->id);

Please note. This wrapper doesn't provide any custom exception handlers.