Skip to content

Latest commit

 

History

History
66 lines (44 loc) · 1.8 KB

StatsApi.md

File metadata and controls

66 lines (44 loc) · 1.8 KB

URLR\StatsApi

All URIs are relative to https://urlr.me/api, except if the operation defines another base path.

Method HTTP request Description
stats() POST /stats Get statistics of a link

stats()

stats($statsRequest): \URLR\Model\Stats200Response

Get statistics of a link

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: bearerAuth
$config = URLR\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new URLR\Api\StatsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$statsRequest = new \URLR\Model\StatsRequest(); // \URLR\Model\StatsRequest | Infos to provide to get statistics of a link

try {
    $result = $apiInstance->stats($statsRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling StatsApi->stats: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
statsRequest \URLR\Model\StatsRequest Infos to provide to get statistics of a link [optional]

Return type

\URLR\Model\Stats200Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]