<commit_before><?php
require_once('Classes/Autoloader.php');
spl_autoload_register('Autoloader::autoload');

echo "<h2>Simple Twitter API Test</h2>";

$settings = array(
    'oauth_access_token' => "<KEY>",
    'oauth_access_token_secret' => "<KEY>",
    'consumer_key' => "<KEY>",
    'consumer_secret' => "<KEY>"
);

$url = "https://api.twitter.com/1.1/statuses/user_timeline.json";

$requestMethod = "GET";
 
$getfield = '?screen_name=iagdotme&count=20';
 
$twitter = new Classes\Twitter\TwitterAPIExchange($settings);
echo $twitter->setGetfield($getfield)
             ->buildOauth($url, $requestMethod)
             ->performRequest();
?><commit_msg>Finished building first twitter api app<commit_after><?php
require_once('Classes/Autoloader.php');
spl_autoload_register('Autoloader::autoload');

echo "<h2>Simple Twitter API Test</h2>";

$settings = array(
    'oauth_access_token' => "<KEY>",
    'oauth_access_token_secret' => "<KEY>",
    'consumer_key' => "<KEY>",
    'consumer_secret' => "<KEY>"
);

$url = "https://api.twitter.com/1.1/statuses/user_timeline.json";

$requestMethod = "GET";
 if (isset($_GET['user']))  {$user = $_GET['user'];}  else {$user  = "iagdotme";}
if (isset($_GET['count'])) {$user = $_GET['count'];} else {$count = 20;}
$getfield = "?screen_name=$user&count=$count";
 
$twitter = new Classes\Twitter\TwitterAPIExchange($settings);
$string = json_decode($twitter->setGetfield($getfield)
        ->buildOauth($url, $requestMethod)
        ->performRequest(), $assoc = TRUE);
if($string["errors"][0]["message"] != "") {echo "<h3>Sorry, there was a problem.</h3><p>Twitter returned the following error message:</p><p><em>".$string[errors][0]["message"]."</em></p>";exit();}
foreach($string as $items)
    {
        echo "Time and Date of Tweet: ".$items['created_at']."<br />";
        echo "Tweet: ". $items['text']."<br />";
        echo "Tweeted by: ". $items['user']['name']."<br />";
        echo "Screen name: ". $items['user']['screen_name']."<br />";
        echo "Followers: ". $items['user']['followers_count']."<br />";
        echo "Friends: ". $items['user']['friends_count']."<br />";
        echo "Listed: ". $items['user']['listed_count']."<br /><hr />";
    }
?>
{'fraction_non_alphanumeric': 0.2300045187528242, 'fraction_numerical': 0.0072300045187528245, 'mean_word_length': 4.662404092071611, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 47, 'https://': 2, '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': '4450181', 'n_tokens_mistral': 774, 'n_tokens_neox': 754, 'n_words': 128}