#!/usr/bin/perl

use Net::Twitter;
use Data::Dumper;

if (@ARGV < 2) {
	die "Usage: ./direct_messages.pm <username> <password> [apiurl [apihost [since [since_id [page]]]]]";
}
my ($username, $password, $apiurl, $apihost, $since, $since_id, $page) = @ARGV;
my $twit = Net::Twitter->new(username=>$username,
			     password=>$password,
			     apiurl=>$apiurl,
			     apihost=>$apihost,
			     apirealm=>"Shovel API");
my $result = $twit->sent_direct_messages({since=>$since,
                             		  since_id=>$since_id,
                             		  page=>$page});
print Dumper($result);
