<commit_before><?php
namespace Mrofi\VideoInfo;

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

class Vimeo extends AbstractInfo implements VideoContract
{
    protected static $endpoint = 'http://vimeo.com/api/oembed.json';

    protected $attributes;
    
    public function __construct($id)
    {
        $client = new Client();
        $videoUrl = rawurlencode('http://vimeo.com/'.$id);
        $query = [
            'url' => $videoUrl,
            'width' => '640',
        ];
        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;
                $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 GuzzleHttp\Exception\TransferException;
use Mrofi\VideoInfo\VideoInfoInterface as VideoContract;

class Vimeo extends AbstractInfo implements VideoContract
{
    protected static $endpoint = 'http://vimeo.com/api/oembed.json';

    protected $attributes;
    
    public function __construct($id)
    {
        $client = new Client();
        $videoUrl = rawurlencode('http://vimeo.com/'.$id);
        $query = [
            'url' => $videoUrl,
            'width' => '640',
        ];
        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;
                $this->attributes->id = $id;
            }
        } catch (TransferException $e) {
{'fraction_non_alphanumeric': 0.14516920058852378, 'fraction_numerical': 0.005885237861696911, 'mean_word_length': 2.2125984251968505, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '1145302', 'n_tokens_mistral': 587, 'n_tokens_neox': 570, 'n_words': 119}