paravibe / perfops
API layer for Perfops
1.0
2019-11-01 15:23 UTC
Requires
- php: ^7.2
- ext-json: *
- guzzlehttp/guzzle: ^6.4
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.
Examples
- 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());
- 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.