Tsutomu Koyachi > WebService-Wedata > WebService::Wedata::Database

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

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

WebService::Wedata::Database - Wedata Database object

DESCRIPTION ^

Wedata Database object

METHODS ^

new

Arguments: %params($ua, $api_key, $name, $description, $resource_url, @required_keys, @optional_keys, $permit_other_keys)
Return Value: $database
  my $database = WebService::Databse->new(
      ua => LWP::UserAgent->new,
      api_key => 'YOUR_API_KEY',
      name => 'YOUR_DATABASE_NAME',
      description => 'DESCRIPTUON',
      required_keys => [qw/foo bar baz/],
      optional_keys => [qw/hoge fuga/],
      permit_other_keys => 1,
  );

Constructor.

add_required_key

Arguments: $key
Return Value: none

Add $key to required_keys.

add_optional_key

Arguments: $key
Return Value: none

Add $key to optional_keys.

update

Arguments: none
Return Value: none
  $database->description('updated description');
  $database->update;

Update database.

delete

Arguments: none
Return Value: none

Delete database.

get_items

Arguments: none
Return Value: @items
  my @items = $database->get_items;

Get all items in $database.

get_item

Arguments: %params($id)
Return Value: $item

Get specified $id item. Return value is instance of WebService::Wedata::Item.

create_item

Arguments: %params($name, %data(key => value))
Return Value: $item

Crete $item.

update_item

Arguments: %params($name, %data(key => value))
Return Value: $item

Update $item.

delete_item

Arguments: %params($id)
Return Value: none

Delete specified $id item.

syntax highlighting: