p qw/croak/;
use File::Temp;
use Socialtext::Resting::DefaultRester;
use Socialtext::Resting;
use JSON::XS;
=head1 NAME
Socialtext::EditPage - Edit a wiki page using your favourite EDITOR.
=cut
ou
is mandatory";
my $rester = $self->{rester};
$rester->accept('application/json');
my $pages = decode_json($rester->get_taggedpages($tag));
unless (@$pages) {
die "No pages fou
g = shift;
$self->{taggedpages}{$tag} = shift;
}
=head2 json_verbose
Set the json_verbose flag.
=cut
sub json_verbose { $_[0]->{json_verbose} = $_[1] }
=head2 response
Retrieve a fake respon
package Socialtext::Resting::LocalCopy;
use strict;
use warnings;
use JSON::XS;
=head1 NAME
Socialtext::Resting::LocalCopy - Maintain a copy on disk of a workspace
=head1 SYNOPSIS
Socialtext::Rest
et_pages();
$r->accept('application/json');
$r->json_verbose(1);
for my $p (@pages) {
print "Saving $p ...\n";
my $obj = decode_json($r->get_page($p));
# Trim the
my $json_file = "$wikitext_file.json";
open(my $jfh, ">$json_file") or die "Can't open $json_file: $!";
print $jfh encode_json($obj);
close $jfh or die "Can't write $json_file