#!/usr/bin/perl -w

use strict;
use warnings;
use Carp;

use WebService::Browshot;


my $browshot = WebService::Browshot->new(
	key	=> 'my_api_key',
	debug	=> 0, # no more debug information
);

my $account = $browshot->account_info();

# Check my balance
print "Free screenshots left for this month: ", $account->{free_screenshots_left}, "\n";
print "Credits left: ", $account->{balance}, "\n";

if ($account->{balance} < 100) {
	# Send an alarm when the balance is low
}