Committer: ailyin
LJSUP-8191 (rename LJ::API::BitLy to LJ::Client::BitLy)D trunk/cgi-bin/LJ/API/BitLy.pm A trunk/cgi-bin/LJ/Client/BitLy.pm U trunk/cgi-bin/LJ/Worker/Repost.pm U trunk/cvs/killfile-local.conf
Deleted: trunk/cgi-bin/LJ/API/BitLy.pm =================================================================== --- trunk/cgi-bin/LJ/API/BitLy.pm 2011-03-24 10:47:22 UTC (rev 10295) +++ trunk/cgi-bin/LJ/API/BitLy.pm 2011-03-25 02:32:41 UTC (rev 10296) @@ -1,19 +0,0 @@ -package LJ::API::BitLy; -use strict; - -use LWP::UserAgent; - -sub shorten { - my ($class, $url) = @_; - - my $ua = LJ::get_useragent( 'role' => 'bit_ly_shorten' ); - my $address = 'http://api.j.mp/v3/shorten?' . - 'login=' . $LJ::BIT_LY_LOGIN . '&' . - 'apiKey=' . $LJ::BIT_LY_API_KEY . '&' . - 'longUrl=' . LJ::eurl($url) . '&' . - 'format=txt'; - - return $ua->get($address)->content; -} - -1; Added: trunk/cgi-bin/LJ/Client/BitLy.pm =================================================================== --- trunk/cgi-bin/LJ/Client/BitLy.pm (rev 0) +++ trunk/cgi-bin/LJ/Client/BitLy.pm 2011-03-25 02:32:41 UTC (rev 10296) @@ -0,0 +1,19 @@ +package LJ::Client::BitLy; +use strict; + +use LWP::UserAgent; + +sub shorten { + my ($class, $url) = @_; + + my $ua = LJ::get_useragent( 'role' => 'bit_ly_shorten' ); + my $address = 'http://api.j.mp/v3/shorten?' . + 'login=' . $LJ::BIT_LY_LOGIN . '&' . + 'apiKey=' . $LJ::BIT_LY_API_KEY . '&' . + 'longUrl=' . LJ::eurl($url) . '&' . + 'format=txt'; + + return $ua->get($address)->content; +} + +1; Modified: trunk/cgi-bin/LJ/Worker/Repost.pm =================================================================== --- trunk/cgi-bin/LJ/Worker/Repost.pm 2011-03-24 10:47:22 UTC (rev 10295) +++ trunk/cgi-bin/LJ/Worker/Repost.pm 2011-03-25 02:32:41 UTC (rev 10296) @@ -3,7 +3,7 @@ use base qw(TheSchwartz::Worker); use LJ::ModuleLoader; -use LJ::API::BitLy; +use LJ::Client::BitLy; sub subclasses { return LJ::ModuleLoader->module_subclasses(__PACKAGE__); @@ -23,7 +23,7 @@ sub shorten_url { my ($class, $url) = @_; - return LJ::API::BitLy->shorten($url); + return LJ::Client::BitLy->shorten($url); } ## see also: LJ::html_get_img_urls Modified: trunk/cvs/killfile-local.conf =================================================================== --- trunk/cvs/killfile-local.conf 2011-03-24 10:47:22 UTC (rev 10295) +++ trunk/cvs/killfile-local.conf 2011-03-25 02:32:41 UTC (rev 10296) @@ -4,3 +4,4 @@ cgi-bin/LJ/API/Twitter.pm htdocs/pay/paymeth/webmoney.bml htdocs/pay/paymeth +cgi-bin/LJ/API/BitLy.pm