Tsutomu Koyachi > WebService-Wedata > WebService::Wedata::Item

Download:
WebService-Wedata-v0.0.4.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

WebService::Wedata::Item - Wedata Item object

DESCRIPTION ^

Wedata Item object

METHODS ^

new

Arguments: %params($database, $name, %data, $resource_url)
Return Value: $item

Constructor. Take a parent database(WebService::Wedata::Database instance) and item name.

  my $database = WebService::Wedata->get_database('AutoPagerize');
  my $item = WebService::Wedata::Item->new(
      database => $database,
      name => 'new item',
      resorce_url => ...
  );

Also take a optional data hash.

  my $item = WebService::Wedata::Item->new(
      database => $database,
      name => 'new item',
      data => {
          url => ...,
          nextLink => ...,
          pageElement => ...,
      },
      resorce_url => ...
  });

set_data

Arguments: $key, $value
Return Value: none

Set {$key => $value} to item data hash.

update

Arguments: %data
Return Value: none

Update self as %data.

  $item->update(
      url => 'aa',
      nextLink => '',
      pageElement => '',
  );

delete

Arguments: none
Return Value: none

Delete self.

  $item->delete;
syntax highlighting: