<commit_before><?php

//require
require_once '../../../autoload.php';
require_once 'config.php';

use \TijsVerkoyen\Dropbox\Dropbox;

// create instance
$dropbox = new Dropbox(APPLICATION_KEY, APPLICATION_SECRET);

// The code below will do the oAuth-dance
//$response = $dropbox->oAuthRequestToken();
//if(!isset($_GET['authorize'])) $dropbox->oAuthAuthorize($response['oauth_token'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] .'?authorize=true');
//else $response = $dropbox->oAuthAccessToken($_GET['oauth_token']);
//$response = $dropbox->token(EMAIL, PASSWORD);
//var_dump($response);
//exit;

$dropbox->setOAuthToken(TOKEN);
$dropbox->setOAuthTokenSecret(TOKEN_SECRET);

try {
    $response = $dropbox->account(time() . '-<EMAIL>', PASSWORD, '<PASSWORD>', '<PASSWORD>');
    $response = $dropbox->accountInfo();
    $response = $dropbox->filesGet(BASE_PATH .'hàh@, $.txt');
    $response = $dropbox->filesPost(BASE_PATH, realpath('../dropbox.php'));
    $response = $dropbox->filesPost(BASE_PATH .'with spaces', realpath('../dropbox.php'));
    $response = $dropbox->filesPost(BASE_PATH .'met spaties/', realpath('/Users/tijs/Projects/dropbox/tests/with spaces.txt'));
    $response = $dropbox->metadata(BASE_PATH .'met spaties');
    $response = $dropbox->thumbnails(BASE_PATH .'image.png');

    $response = $dropbox->fileopsCopy(BASE_PATH . 'image.png', BASE_PATH . 'copy_' . time());
    $response = $dropbox->fileopsCreateFolder(BASE_PATH .'created_'. time());
    $response = $dropbox->fileopsDelete(BASE_PATH .'will_be_deleted');
    $response = $dropbox->fileopsMove(BASE_PATH .'will_be_moved', BASE_PATH .'moved_'. time());
} catch (Exception $e) {
    var_dump($e);
}

// output
var_dump($response);<commit_msg>Code cleanup<commit_after><?php

//require
require_once '../../../autoload.php';
require_once 'config.php';

use \TijsVerkoyen\Dropbox\Dropbox;

// create instance
$dropbox = new Dropbox(APPLICATION_KEY, APPLICATION_SECRET);

// The code below will do the oAuth-dance
//$response = $dropbox->oAuthRequestToken();
//if(!isset($_GET['authorize'])) $dropbox->oAuthAuthorize($response['oauth_token'], 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] .'?authorize=true');
//else $response = $dropbox->oAuthAccessToken($_GET['oauth_token']);
//$response = $dropbox->token(EMAIL, PASSWORD);
//var_dump($response);
//exit;

$dropbox->setOAuthToken(TOKEN);
$dropbox->setOAuthTokenSecret(TOKEN_SECRET);

try {
//	@todo response = $dropbox->account(time() . '-<EMAIL>', PASSWORD, '<PASSWORD>', '<PASSWORD>');
//	@todo response = $dropbox->accountInfo();
//
//	@todo response = $dropbox->filesGet(BASE_PATH .'hàh@, $.txt');
//	@todo response = $dropbox->filesPost(BASE_PATH, realpath('../dropbox.php'));
//	@todo response = $dropbox->filesPost(BASE_PATH .'with spaces', realpath('../dropbox.php'));
//	@todo response = $dropbox->filesPost(BASE_PATH .'met spaties/', realpath('/Users/tijs/Projects/dropbox/tests/with spaces.txt'));
//
//	@todo response = $dropbox->metadata(BASE_PATH .'met spaties');
//	@todo response = $dropbox->thumbnails(BASE_PATH .'image.png');
//
//	@todo response = $dropbox->fileopsCopy(BASE_PATH . 'image.png', BASE_PATH . 'copy_' . time());
//	@todo response = $dropbox->fileopsCreateFolder(BASE_PATH .'created_'. time());
//	@todo response = $dropbox->fileopsDelete(BASE_PATH .'will_be_deleted');
//	@todo response = $dropbox->fileopsMove(BASE_PATH .'will_be_moved', BASE_PATH .'moved_'. time());
} catch (Exception $e) {
  var_dump($e);
}

// output
var_dump($response);
{'fraction_non_alphanumeric': 0.20942703923228903, 'fraction_numerical': 0.0, 'mean_word_length': 5.261484098939929, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 45, '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': '6563473', 'n_tokens_mistral': 1259, 'n_tokens_neox': 1265, 'n_words': 208}