Changeset 10069
- Timestamp:
- 04/21/08 18:46:11 (6 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/WebService-Simple/branch/lwp-base/lib/WebService/Simple.pm
r10066 r10069 210 210 { method => "flickr.test.echo", name => "value" }); 211 211 212 # Create a subclass - Encapsulates things better 212 =head1 DESCRIPTION 213 214 WebService::Simple is a simple class to interact with web services. 215 216 It's basically an LWP::UserAgent that remembers recurring api URLs and 217 parameters, plus sugar to parse the results. 218 219 220 =head1 SUBCLASSING 221 222 For better encapsulation, you can create subclass of WebService::Simple to 223 customize the behavior 224 213 225 package WebService::Simple::Flickr; 214 226 use base qw(WebService::Simple); … … 234 246 } 235 247 236 # Using response objects237 my $service = WebService::Simple->new(238 response_parser => MyParser->new239 );240 my $resp = $service->get(...);241 my $blob = $resp->parse_response; # Parsed with MyParser242 243 =head1 DESCRIPTION244 245 WebService::Simple is a simple class to interact with web services.246 247 It's basically an LWP::UserAgent that remembers recurring api URLs and248 parameters, plus sugar to parse the results.249 248 250 249 =head1 PARSERS … … 272 271 Daisuke Maki C<< <daisuke@endeworks.jp> >> 273 272 273 Matsuno Tokuhiro 274 274 275 =head1 COPYRIGHT AND LICENSE 275 276
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)