Retrieve and compare information about commits.
$commits = new Bitbucket\API\Repositories\Commits();
$commits->setCredentials(new Http\Message\Authentication\BasicAuth($bb_user, $bb_pass));
$commits->all($account_name, $repo_slug);
$commits->all($account_name, $repo_slug, array(
'branch' => 'master' // this can also be a tag
));
$commits->get($account_name, $repo_slug, $commitSHA1);
$commits->approve($account_name, $repo_slug, $commitSHA1);
$commits->deleteApproval($account_name, $repo_slug, $commitSHA1);