<?php

namespace App\Api;

/**
 * class TTRssClient.
 *
 * @author Simon Vieille <simon@deblan.fr>
 */
class TTRssClient
{
    public function getPager(int $page = 1): array
    {
        $result = @file_get_contents('https://tiny.deblan.org/deblan_api/?itemsPerPage=10&page='.$page);

        if ($result) {
            $result = str_replace('\\u0092', "'", $result);
            $result = str_replace('&#039;', "'", $result);

            return json_decode($result, true);
        }

        return [];
    }
}
