2012/02/18 Sat 19:25
oquno
sendmail の設定もしてないし、それなら Notify My Android に送った方がいいなということで少し Serene Bach をいじった。Perl 全然わかってないけど。HTTP::Request::Common を入れる罰とかも受けた。
lib/sb/App/Receipt.pm で
$self->send_nma($new, $entry);
を
$self->_sendmail("com",$new,$entry);
の下あたりに追加して、適当なところに
sub send_nma { use HTTP::Request::Common; my $self = shift; my ($obj,$entry) = @_; my $url = "https://www.notifymyandroid.com/publicapi/notify"; my $text = "new comment [". $obj->body ."] by ". $obj->auth . " for " . $entry->subj . " http://oquno.com/" . $entry->id ; my $data = [apikey => "APIKEY", application => 'BLOGNAME', # ちゃんとオブジェクトから取れそう event => 'comment', description => $text]; my $ua = LWP::UserAgent->new; $ua->request(POST $url, $data); }
を追加した。やっぱ Perl 苦手っぽい。
<< Google Latitude の位置情報を Twitter につけるの図解
複数台の Kindle を会社とかで使う場合について >>
[0] [top]