NAME

Socialtext::Resting - module for accessing Socialtext REST APIs

SYNOPSIS

use Socialtext::Resting;
my $Rester = Socialtext::Resting->new(
  username => $opts{username},
  password => $opts{password},
  server   => $opts{server},
);
$Rester->workspace('wikiname');
$Rester->get_page('my_page');
}

DESCRIPTION

Socialtext::Resting is a module designed to allow remote access to the Socialtext REST APIs for use in perl programs.

METHODS

new

my $Rester = Socialtext::Resting->new(
    username => $opts{username},
    password => $opts{password},
    server   => $opts{server},
);

Creates a Socialtext::Resting object for the specified server/user/password combination.

get_page

$Rester->workspace('wikiname');
$Rester->get_page('page_name');

Retrieves the content of the specified page. Note that the workspace method needs to be called first to specify which workspace to operate on.

get_attachment

$Rester->workspace('wikiname');
$Rester->get_attachment('attachment_id);

Retrieves the specified attachment from the workspace. Note that the workspace method needs to be called first to specify which workspace to operate on.

put_pagetag

$Rester->workspace('wikiname');
$Rester->put_pagetag('page_name', 'tag');

Add the specified tag to the page.

delete_pagetag

$Rester->workspace('wikiname');
$Rester->delete_pagetag('page_name', 'tag');

Delete the specified tag from the page.

post_attachment

$Rester->workspace('wikiname');
$Rester->post_attachment('page_name',$id,$content,$mime_type);

Attach the file to the specified page

put_page

$Rester->workspace('wikiname');
$Rester->put_page('page_name',$content);

Save the content as a page in the wiki.

get_pages

$Rester->workspace('wikiname');
$Rester->get_pages();

List all pages in the wiki.

get_pagetags

$Rester->workspace('wikiname');
$Rester->get_pagetags('page_name');

List all pagetags on the specified page

get_taggedpages

$Rester->worksapce('wikiname');
$Rester->get_taggedpages('tag');

List all the pages that are tagged with 'tag'.

get_workspaces

$Rester->get_workspaces();

List all workspaces on the server

AUTHORS

Chris Dent, <chris.dent@socialtext.com> Kirsten Jones <kirsten.jones@socialtext.com>