Today, I released the new version of WebService::Hatena::Graph along with some updates of Hatena::Graph API. It's become totally new, adding several features, getting graph data and setting/getting configurations.
The feature to set new graph data has been offered since the API was released, but the method to enable users to do so is now renamed to postdata() from post() to distingish posting some graph data , postdata(), from posting some configs, post_config().
Here's a usage of this module:
use WebService::Hatena::Graph;
my $graph = WebService::Hatena::Graph->new(
username => $username,
password => $password,
);
# set data to the specified graph
$graph->post_data(
graphname => $graphname,
date => $date,
value => $value,
);
# retrieve graph data
my $graph_data = $graph->get_data(
graphname => $graphname,
username => $username,
);
# set config
$graph->post_data(
graphname => $graphname,
graphcolor => $graphcolor,
graphtype => $graphtype,
status => $status,
allowuser => $allowuser,
allowgrouplist => $allowgrouplist,
stack => $stack,
reverse => $reverse,
formula => $formula,
maxy => $maxy,
miny => $miny,
showdata => $showdata,
nolabel => $nolabel,
userline => $userline,
userlinecolor => $userlinecolor,
comment => $comment,
);
# retrieve config
my $graph_config = $graph->get_config( graphname => $graphname );
Enjoy!