# metricool/2.1.1/app/Http/Endpoints/Responses/RealtimeResponse.php

Metricool – Social media and site statistics, version 2.1.1. 45 lines.

- Page: https://pluginprobe.com/plugins/metricool/2.1.1/code/app/Http/Endpoints/Responses/RealtimeResponse.php
- Raw: https://pluginprobe.com/plugins/metricool/2.1.1/raw/app/Http/Endpoints/Responses/RealtimeResponse.php
- Modified: 2026-08-20T14:08:30+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/metricool/2.1.1/code/app/Http/Endpoints/Responses/RealtimeResponse.php#L10-L20`.

```php
<?php

declare(strict_types=1);

namespace Metricool\Http\Endpoints\Responses;

class RealtimeResponse extends Response
{
    /**
     * @var array $totals The data to be shown in the totals columns
     * @see \Metricool\Services\RealtimeService::getTotals()
     */
    public array $totals = [];
    /**
     * @var array $timelineData The data to be shown in the timeline
     * @see \Metricool\Services\RealtimeService::getTimelineData()
     */
    public array $timelineData = [];

    public function setTotals(array $totals): self
    {
        $this->totals = $totals;

        return $this;
    }

    public function setTimelineData(array $timeline): self
    {
        $this->timelineData = $timeline;

        return $this;
    }

    /**
     * @inheritDoc
     */
    public function body(): array
    {
        return [
            'totals' => $this->totals,
            'timelineData' => $this->timelineData,
        ];
    }
}

```
