Subject: | PATCH - update API URI and add simple API method |
As of last year the API needs to be accessed from upcoming.yahoo.com
rather than upcoming.org. Also the getcountrylist method doesn't work
anymore unless it is moved to the country module.
Simple 2 line patch makes this handy module usable again. Thanks!
- Murray
diff -ru WebService-Upcoming-0.05.orig/Upcoming/Object/Country.pm
WebService-Upcoming-0.05/Upcoming/Object/Country.pm
--- WebService-Upcoming-0.05.orig/Upcoming/Object/Country.pm 2005-06-21
08:26:35.000000000 -0700
+++ WebService-Upcoming-0.05/Upcoming/Object/Country.pm 2008-06-08
14:34:56.000000000 -0700
@@ -26,6 +26,7 @@
return ('id','name','code') if ($_[0] eq '1.0');
return (); }
sub _info { return (
+ { 'upco' => 'metro.getCountryList','http' => 'GET' },
{ 'upco' => 'event.getCountryList','http' => 'GET' } ); }
1;
__END__
diff -ru WebService-Upcoming-0.05.orig/Upcoming.pm
WebService-Upcoming-0.05/Upcoming.pm
--- WebService-Upcoming-0.05.orig/Upcoming.pm 2005-06-21
08:26:35.000000000 -0700
+++ WebService-Upcoming-0.05/Upcoming.pm 2008-06-08 14:34:15.000000000 -0700
@@ -108,7 +108,7 @@
delete($args->{'password'}) if (!$args->{'password'});
$args->{'method'} = $upco;
$args->{'api_key'} = $self->{'keyy'};
- $urix = URI->new('http://upcoming.org/services/rest/');
+ $urix = URI->new('http://upcoming.yahooapis.com/services/rest/');
$rqst = new HTTP::Request;
$rqst->header('Content-Type' => 'application/x-www-form-urlencoded');
$rqst->method($Upco_Info{$upco}->{'http'});
Subject: | WebService-Upcoming-0.05.diff |
diff -ru WebService-Upcoming-0.05.orig/Upcoming/Object/Country.pm WebService-Upcoming-0.05/Upcoming/Object/Country.pm
--- WebService-Upcoming-0.05.orig/Upcoming/Object/Country.pm 2005-06-21 08:26:35.000000000 -0700
+++ WebService-Upcoming-0.05/Upcoming/Object/Country.pm 2008-06-08 14:34:56.000000000 -0700
@@ -26,6 +26,7 @@
return ('id','name','code') if ($_[0] eq '1.0');
return (); }
sub _info { return (
+ { 'upco' => 'metro.getCountryList','http' => 'GET' },
{ 'upco' => 'event.getCountryList','http' => 'GET' } ); }
1;
__END__
diff -ru WebService-Upcoming-0.05.orig/Upcoming.pm WebService-Upcoming-0.05/Upcoming.pm
--- WebService-Upcoming-0.05.orig/Upcoming.pm 2005-06-21 08:26:35.000000000 -0700
+++ WebService-Upcoming-0.05/Upcoming.pm 2008-06-08 14:34:15.000000000 -0700
@@ -108,7 +108,7 @@
delete($args->{'password'}) if (!$args->{'password'});
$args->{'method'} = $upco;
$args->{'api_key'} = $self->{'keyy'};
- $urix = URI->new('http://upcoming.org/services/rest/');
+ $urix = URI->new('http://upcoming.yahooapis.com/services/rest/');
$rqst = new HTTP::Request;
$rqst->header('Content-Type' => 'application/x-www-form-urlencoded');
$rqst->method($Upco_Info{$upco}->{'http'});
Only in WebService-Upcoming-0.05: Upcoming.pm~