| | 214 | =head1 METHODS |
| | 215 | |
| | 216 | =over 4 |
| | 217 | |
| | 218 | =item new(I<%args>) |
| | 219 | |
| | 220 | my $flickr = WebService::Simple->new( |
| | 221 | base_url => "http://api.flickr.com/services/rest/", |
| | 222 | param => { api_key => "your_api_key", } |
| | 223 | ); |
| | 224 | |
| | 225 | Create and return a new WebService::Simple object. |
| | 226 | "new" Method requires a base_url of Web Service API. |
| | 227 | |
| | 228 | =item get(I<[$extra_path,] $args>) |
| | 229 | |
| | 230 | my $response = |
| | 231 | $flickr->get( { method => "flickr.test.echo", name => "value" } ); |
| | 232 | |
| | 233 | Send GET request, and you can get the WebService::Simple::Response object. |
| | 234 | If you want to add a path to base URL, use an option parameter. |
| | 235 | |
| | 236 | my $lingr = WebService::Simple->new( |
| | 237 | base_url => "http://www.lingr.com/", |
| | 238 | param => { api_key => "your_api_key", format => "xml" } |
| | 239 | ); |
| | 240 | my $response = $lingr->get( 'api/session/create', {} ); |
| | 241 | |
| | 242 | =item post(I<[$extra_path,] $args>) |
| | 243 | |
| | 244 | Send POST request. |
| | 245 | |
| | 246 | =item base_url |
| | 247 | |
| | 248 | =item basic_params |
| | 249 | |
| | 250 | =item cache |
| | 251 | |
| | 252 | =item response_parser |
| | 253 | |
| | 254 | =back |
| | 255 | |