_member']";
return
"post $base_url/system/userManager/group/$act_on_group-$act_on_role.update.json $post_variables";
}
#}}}
#{{{sub add_eval
sub add_eval {
my ($res) = @_;
return ( ${$r
=> $VERSION,
base => 'Scaffold::Handler',
constant => 'TRUE FALSE ARRAY',
codec => 'JSON',
;
# ----------------------------------------------------------------------
# Public Methods
#
---------------------------------------
sub do_api {
my ($self) = @_;
my $code;
my $json;
my $actions;
my $introspection = $self->introspect();
my $params = $self->scaffold->
ctions,
}
$json = encode($code);
if (($params->{format}) and ($params->{format} eq 'json')) {
$self->view->content_type('application/json');
$js = $json;
} else {
w AnyEvent::Handle
fh => $fh,
on_read => sub {
$h->push_read(json => sub {
my (undef, $evt) = @_;
$self->handle_event($evt);
eTime;
use Scaffold::Class
version => $VERSION,
base => 'Scaffold::Handler',
codec => 'JSON',
;
# ----------------------------------------------------------------------
# Public Methods
#
;
$self->stash->view->template_disabled(1);
$self->stash->view->content_type('application/json');
}
# ----------------------------------------------------------------------
# Private Methods
provided by
L<IRC::Indexer::Report::Network>.
Current as of IRC::Indexer 0.01
=head1 FORMAT
B<JSON> is the preferred format for network transmission; it is light
and support is fairly universal.
t and session to handle a single forked trawler.
## This is mostly intended for ircindexer-server-json.
## Provide compatible methods w/ Bot::Trawl
## Other layers can use this with the same interfac
ngs
return 0 if $_->{name} =~ /^(?:blib|_build|inc|Makefile(?:\.old)?|pm_to_blib|MYMETA\.(?:yml|json))\z/;
# It is fairly common to get bogged down in NYTProf output
return 0 if $_->{name} =~ /
ild files
push @$rule, '(?:^|\\/)(?:blib|_build|inc|Makefile(?:\.old)?|pm_to_blib|MYMETA\.(?:yml|json))\z';
# Ignore the enormous NYTProf output
push @$rule, '(?:^|\\/)nytprof(?:\.out)?\z';
retu
wSocket;
use 5.006;
use Any::Moose;
=head1 NAME
AnyMQ::ZeroMQ - AnyMQ using just a socket and JSON.
=head1 VERSION
Version 0.01
=cut
our $VERSION = '0.02';
=head1 SYNOPSIS
my $bus = AnyMQ-
SIS
## Pull stats from a single server:
$ ircindexer-single -s irc.cobaltirc.org -f JSON -o cobaltirc.json
## Generate some example confs:
$ ircindexer-examplecf -t httpd -o httpd.cf
$ $ED
$ $EDITOR cobaltirc/eris.oppresses.us.server
. . .
## Spawn a httpd serving JSON:
$ ircindexer-server-json -c httpd.cf
## See IRC::Indexer::Trawl::Bot for more on using trawlers from
#
rver-json> serves as a real world example of how to use
the trawler system to index IRC networks; it is usable as-is to trawl
sets of IRC servers belonging to configured networks and serve JSON-seri
application/javascript' => Wx::Scintilla::Constant::SCLEX_ESCRIPT, # CONFIRMED
'application/json' => Wx::Scintilla::Constant::SCLEX_ESCRIPT, # CONFIRMED
'application/x-latex' =
t_fileextension\",\"_charset_\":\"utf-8\"},\"_charset_\":\"utf-8\"},{\"url\":\"$content_path.save.json\",\"method\":\"POST\",\"_charset_\":\"utf-8\"}]']";
return "post $base_url/system/batch $post
();
use File::Spec ();
use Scalar::Util ();
use Params::Util ();
use JSON::XS ();
use LWP::UserAgent ();
use HTTP::Cookies ();
use HTTP::Reques
rver found.';
my $response = $self->POST(
"$server/register",
'Content-Type' => 'application/json',
'Content' => $self->encode( \%params ),
);
if ( $response->code == 201 ) {
return 'A
server found.';
my $response = $self->PUT(
"$server/config",
'Content-Type' => 'application/json',
'Content' => $self->encode( \%copy ),
);
if ( $response->code == 204 ) {
return 'Con
here will be some extra processing overhead when results are
## cached.
CacheDir: /home/ircindex/jsoncache
## LogFile:
##
## Path to log file.
## If omitted, no logging takes place.
LogFile: /home/i
rawlers: 10
## MaxEncoders:
##
## Workers are forked off to handle the potentially expensive
## JSON encoding of server trawl results; if you're trawling
## a lot of networks, you may want to throt
$profile_update_json =
"{\"elements\":{\"$field\":{\"value\":\"$value\"}}}";
my $post_variables =
"\$post_variables = [':content','$profile_update_json',':contentType','json',':operation','
s','true']";
return
"post $base_url/~$act_on_user/public/authprofile/$profile_section.profile.json $post_variables";
}
#}}}
#{{{sub profile_update_eval
sub profile_update_eval {
my ($res) =
nts {
'application/javascript' => 'Padre::Plugin::JavaScript::Document',
'application/json' => 'Padre::Plugin::JavaScript::Document',
}
The C<registered_documents> method can be u
$server, $VERSION, $report->{instance_id};
# my $query = {
# instance_id =>
# data => JSON::encode_json($report),
# };
# TO DO: Enable as soon as the server is functional:
# $self->task_requ
vent (@events) {
# send as json to connected listeners
foreach my $connection ($self->bus->all_connections) {
$connection->push_write(json => $event);
}
}
};
1
x-perl',
'application/x-php' => 'application/perl', # Temporary solution
'application/json' => 'application/javascript',
'application/javascript' => 'text/x-csrc',
'text/x-java'
existence of defined!';
}
return "get $base_url/system/userManager/user/$act_on_user.tidy.json";
}
#}}}
#{{{sub exists_eval
sub exists_eval {
my ($res) = @_;
return ( ${$res}->code
:ParseJsonIodef;
require CIF::Archive;
require JSON;
sub Prepare { return 1; }
sub Commit {
my $self = shift;
my $r = $self->TicketObj->IODEF();
my $ret = CIF::FeedParser::ParseJsonIodef:
:parse({},JSON::to_json([$r->to_tree()]));
foreach(@$ret){
$_->{'detecttime'} = DateTime->from_epoch(epoch => time());
my ($err,$id) = CIF::Archive->insert($_);
warn $err