<commit_before><?php

require 'vendor/autoload.php';

$dotenv = new Dotenv\Dotenv(__DIR__);
$dotenv->load();


// session_start();

//$client = new Instagram\Client($options);
$instagram = new \Instagram\Instagram(
    getenv('CLIENT_ID'),
    getenv('CLIENT_SECRET'),
    getenv('ACCESS_TOKEN'),
    'http://localhost:9000'
);

//dd($instagram);
//$instagram->getUserByName('skrawg');
header('Content-Type: application/json');
//echo json_encode($instagram->user()->get('268047373')->get());
//echo json_encode($instagram->user()->find('skrawg')->get());
//echo json_encode($instagram->user()->getMedia('268047373')->get());
//echo json_encode($instagram->user()->getLikedMedia()->get());
//echo json_encode($instagram->user()->search('skrawg')->get());

//echo json_encode($instagram->media()->get('1109588739516340817_268047373')->get());
//echo json_encode($instagram->media()->getByShortcode('9RV6okpRin')->get());
//echo json_encode($instagram->media()->search(51.503349, -0.252271)->get());

if (!isset($_GET['code'])) {

     // If we don't have an authorization code then get one
     header('Location: '.$instagram->getLoginUrl());
     exit;

} else {
     $token = $instagram->getAccessToken($_GET['code']);
     echo json_encode($token);
}
<commit_msg>Updated `index.php`<commit_after><?php

require 'vendor/autoload.php';

$dotenv = new Dotenv\Dotenv(__DIR__);
$dotenv->load();


// session_start();

//$client = new Instagram\Client($options);
$instagram = new \Instagram\Instagram(
    getenv('CLIENT_ID'),
    getenv('CLIENT_SECRET'),
    getenv('ACCESS_TOKEN'),
    'http://localhost:9000'
);

//dd($instagram);
//$instagram->getUserByName('skrawg');
//header('Content-Type: application/json');
//echo json_encode($instagram->user()->get('268047373')->get());
//echo json_encode($instagram->user()->find('skrawg')->get());
//echo json_encode($instagram->user()->getMedia('268047373')->get());
//echo json_encode($instagram->user()->getLikedMedia()->get());
//echo json_encode($instagram->user()->search('skrawg')->get());

//echo json_encode($instagram->media()->get('1109588739516340817_268047373')->get());
//echo json_encode($instagram->media()->getByShortcode('9RV6okpRin')->get());
//echo json_encode($instagram->media()->search(51.503349, -0.252271)->get());

if (!isset($_GET['code'])) {

     // If we don't have an authorization code then get one
     header('Location: '.$instagram->getLoginUrl());
     exit;

} else {
     $token = $instagram->getAccessToken($_GET['code']);
     // echo json_encode($token);

    echo json_encode($instagram->user()->get('268047373')->get());
    // echo json_encode($instagram->user()->find('skrawg')->get());
    // echo json_encode($instagram->user()->getMedia('268047373')->get());
    // echo json_encode($instagram->user()->getLikedMedia()->get());
    // echo json_encode($instagram->user()->search('skrawg')->get());
}

{'fraction_non_alphanumeric': 0.2397094430992736, 'fraction_numerical': 0.05257696298858527, 'mean_word_length': 5.513513513513513, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 74, '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': '279134', 'n_tokens_mistral': 1042, 'n_tokens_neox': 957, 'n_words': 129}