<commit_before><?php

namespace Mrofi\VideoInfo;

use DateInterval;
use GuzzleHttp\Client;
use Mrofi\VideoInfo\VideoInfoInterface as VideoContract;

class Youtube extends AbstractInfo implements VideoContract
{
    protected static $endpoint = 'https://www.googleapis.com/youtube/v3/videos';
    protected static $imageBaseUrl = 'https://i.ytimg.com/vi';
    protected static $apiKey;
    protected $attributes;
    
    public function __construct($id)
    {
        $client = new Client();
        $query = [
            'part' => 'contentDetails',
            'key' => static::$apiKey,
            'id' => $id,
        ];
        try {
            $response = $client->re quest('GET', static::$endpoint, compact('query'));
            if ($response->getStatusCode() == '200') {
                $body = $response->getBody();
                $content = $body->getContents();
                $obj = json_decode($content);
                $this->attributes = $obj->items[0]->contentDetails;
                $this->attributes->id = $id;
            }
        } catch (GuzzleHttp\Exception\TransferException $e) {
          //
        }
    }<commit_msg>typo (again) ;-(<commit_after><?php

namespace Mrofi\VideoInfo;

use DateInterval;
use GuzzleHttp\Client;
use Mrofi\VideoInfo\VideoInfoInterface as VideoContract;

class Youtube extends AbstractInfo implements VideoContract
{
    protected static $endpoint = 'https://www.googleapis.com/youtube/v3/videos';
    protected static $imageBaseUrl = 'https://i.ytimg.com/vi';
    protected static $apiKey;
    protected $attributes;
    
    public function __construct($id)
    {
        $client = new Client();
        $query = [
            'part' => 'contentDetails',
            'key' => static::$apiKey,
            'id' => $id,
        ];
        try {
            $response = $client->request('GET', static::$endpoint, compact('query'));
            if ($response->getStatusCode() == '200') {
                $body = $response->getBody();
                $content = $body->getContents();
                $obj = json_decode($content);
                $this->attributes = $obj->items[0]->contentDetails;
                $this->attributes->id = $id;
            }
        } catch (GuzzleHttp\Exception\TransferException $e) {
          //
        }
    }
{'fraction_non_alphanumeric': 0.14366319444444445, 'fraction_numerical': 0.004340277777777778, 'mean_word_length': 2.1446111869031377, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 27, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2706392', 'n_tokens_mistral': 654, 'n_tokens_neox': 634, 'n_words': 131}