From 1e93f874e769bf1c8130644ea15ef1a45649a302 Mon Sep 17 00:00:00 2001 From: Levi Durfee Date: Sun, 19 Jan 2020 13:00:16 -0500 Subject: [PATCH] Add an example --- README.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/README.md b/README.md index 68a6861..cc0495d 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,55 @@ [https://wappr.net/api/cf-graph/](https://wappr.net/api/cf-graph/). +## Example + +### Account + +Using an Account request you can get account level aggregated data. + +```php +addResource($account); + $response = json_decode($client->runQuery()); + + dump($response); + + $threats = $threats + $response->data->viewer->accounts[0]->httpRequests1dGroups[0]->sum->threats; +} + +dump($threats); +``` + +### Zone + +Using an Zone request you can get zone level data. + ## Notes * `vendor/bin/phpunit --coverage-html build`