NAME

Net::OpenSocial::Client::Resource - Resource base class.

SYNOPSIS

package ConcreteResource;
use Any::Moose;
extends 'Net::OpenSocial::Client::Resource';
...


my $cr = ConcreteResource->new;
$cr->set_field( key1 => 'value1 ');
$cr->set_field( key2 => 'value2' );

say $cr->get_field( 'key1' );
say $cr->get_field( 'key2' );

DESCRIPTION

Resource base class. You don't need to use this class directly as long as you dan't develop new opensocial resource class.

METHODS

service

Service name of REST/RPC

version

OpenSocial protocol version number.

fields

Hash reference that represents fields of resource.

get_field( $key )

my $value = $resource->get_field('id');

set_field( $key => $value )

$resource->set_field('id' => $resource_id);

has_field( $key )

if ( $resource->has_field('name') ) {
    say $resource->get_field('name');
}

field_names

my @names = $resource->field_names();

SEE ALSO

Net::OpenSocial::Client::Resource::Person Net::OpenSocial::Client::Resource::Group Net::OpenSocial::Client::Resource::AppData Net::OpenSocial::Client::Resource::Activity

AUTHOR

Lyo Kato, <lyo.kato@gmail.com>

COPYRIGHT AND LICENSE

Copyright (C) 2009 by Lyo Kato

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.