Group
Extension

Matches 35359

Sakai-Nakamura ( X/XE/XEONTIME/Sakai-Nakamura-0.13.tar.gz, XEONTIME, 2012; MetaCPAN )
Sakai-Nakamura/lib/Sakai/Nakamura/ContentUtil.pm ( view source; MetaCPAN )
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
Sakai-Nakamura ( X/XE/XEONTIME/Sakai-Nakamura-0.13.tar.gz, XEONTIME, 2012; MetaCPAN )
Sakai-Nakamura/lib/Sakai/Nakamura/WorldUtil.pm ( view source; MetaCPAN )
urn "post $base_url/system/world/create $post_variables";
}

#}}}

#{{{sub add_eval
# TODO: check JSON that is returned for success, as a 200 status code is
# returned even if the world is not success
Triggermail ( F/FI/FINN/Triggermail-1.005.tar.gz, FINN, 2012; MetaCPAN )
Triggermail/lib/Triggermail.pm ( view source; MetaCPAN )
ings;

our $VERSION = '1.005';

use constant API_URI => 'https://api.sailthru.com';

use LWP;
use JSON::XS;
use URI::Escape;
use HTTP::Request;
use Digest::MD5 qw( md5_hex);
use Params::Validate qw( :
ata->{'format'}  = 'json';
	$data->{'sig'}     = $self->_getSignatureHash($data);
	my $result = $self->_httpRequest( API_URI . "/" . $action, $data, $method );

	my $json    = JSON::XS->new->ascii->pr
etty->allow_nonref;
	my $decoded = $json->decode( $result->content );
	return $decoded ? $decoded : $result;
}

sub _httpRequest {
	validate_pos( @_, { type => HASHREF }, { type => SCALAR }, { type =>
IRC-Indexer ( A/AV/AVENJ/IRC-Indexer-0.06.tar.gz, AVENJ, 2012; MetaCPAN )
IRC-Indexer/lib/IRC/Indexer/Process/JSONify.pm ( view source; MetaCPAN )
ess::JSONify;

## Forking JSON encoder.
## Process refs, encode JSON, return to master and die.

## Pass me a reference:
##  ->put([ $json, $network, $server_name ])
## Get back JSON:
##  [ $json, $ne
twork, $server_name ]

use strict;
use warnings;

use IRC::Indexer::Output::JSON;

use Storable qw/nfreeze thaw/;
use Compress::Zlib qw/memGzip/;

use bytes;

sub worker {
  $0 = "ircindexer ENCODE" u
    my $jsify = IRC::Indexer::Output::JSON->new(
          Input => $hash,
        );
        
        my $json = $jsify->dump;
        my $gzipped = memGzip($json);

        my $frozen = nfreeze( [ $
IRC-Indexer ( A/AV/AVENJ/IRC-Indexer-0.06.tar.gz, AVENJ, 2012; MetaCPAN )
IRC-Indexer/lib/IRC/Indexer/POD/ClientExamples.pod ( view source; MetaCPAN )
he distribution.

=head1 JSON SERVER

L<ircindexer-server-json> can be used to manage a set of trawlers, 
exporting JSON over HTTP for use by frontends.

Note that server-json only reports networks & 
d storage.

Assuming your ircindexer-server-json is running on port 8700 on 
localhost:

=head2 Retrieve available networks

  use LWP::UserAgent;
  use JSON::XS;
  
  my $response = LWP::UserAgent->n
my $networks;
  if ($response->success) {
    my $json = $response->content;
    
    $networks = decode_json($json);
  } else {
    ## Retrieving JSON failed ...
    ## You can check for $response->c
IRC-Indexer ( A/AV/AVENJ/IRC-Indexer-0.06.tar.gz, AVENJ, 2012; MetaCPAN )
IRC-Indexer/lib/IRC/Indexer.pm ( view source; MetaCPAN )
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
Sakai-Nakamura ( X/XE/XEONTIME/Sakai-Nakamura-0.13.tar.gz, XEONTIME, 2012; MetaCPAN )
Sakai-Nakamura/lib/Sakai/Nakamura/UserUtil.pm ( view source; MetaCPAN )
 $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) =
IRC-Indexer ( A/AV/AVENJ/IRC-Indexer-0.06.tar.gz, AVENJ, 2012; MetaCPAN )
IRC-Indexer/lib/IRC/Indexer/Output.pm ( view source; MetaCPAN )
Output::JSON;
  # or: use IRC::Indexer::Output::YAML;
  # or: use IRC::Indexer::Output::Dumper;
  
  ## Convert trawler output into JSON, for example:
  my $output = IRC::Indexer::Output::JSON->new(
 
as L<IRC::Indexer::Output::JSON>.

=head1 METHODS

=head2 new

Create an output encoder; the reference to serialize must be specified:

  my $out = IRC::Indexer::Output::JSON->new(
    Input => $ref,
  );

=head2 dump

Return the serialized output as a scalar.

  my $json = $out->dump;

=head2 write

Write serialized output to a file path or an opened FH.

  $out->write($path);

Will croak() on er
Games-Lacuna-Client ( H/HA/HALKEYE/Games-Lacuna-Client-0.003.tar.gz, HALKEYE, 2012; MetaCPAN )
Games-Lacuna-Client/lib/Games/Lacuna/Client/Governor.pm ( view source; MetaCPAN )
 qw(sum max min);
use List::MoreUtils qw(any part uniq);
use Hash::Merge qw(merge);
use JSON qw(to_json from_json);
require YAML::Any;
use Carp;

use Data::Dumper;

sub new {
    my ($self, $client, $
.json";
    my $data;
    if (-e $cache_file) {
        local $/;
        eval {
            open( my $fh, '<', $cache_file );
            my $json_text   = <$fh>;
            $data = from_json( $json
self->{config}->{cache_dir} . "/buildings.json";

    $self->{cache}->{cache_time} = time;

    if(open( my $fh, '>', $cache_file)) {
        print $fh to_json($self->{cache});
        close $fh;
    
Data-Manager ( G/GP/GPHAT/Data-Manager-0.10.tar.gz, GPHAT, 2012; MetaCPAN )
Data-Manager/lib/Data/Manager.pm ( view source; MetaCPAN )
ay be serialized thusly:

  my $ser = $dm->freeze({ format => 'JSON' });
  # later
  my $dm = Data::Manager->thaw($ser, { format => 'JSON' });

This is possible thanks to the magic of L<MooseX::Storag
WebService-IMDB ( C/CJ/CJK/WebService-IMDB-0.05.tar.gz, CJK, 2012; MetaCPAN )
WebService-IMDB/lib/WebService/IMDB/Base.pm ( view source; MetaCPAN )
__content()->{$page};

    if (! defined $content) {

	$content = $self->_ws()->_response_decoded_json($self->_request($page));

	$self->__content()->{$page} = $content;
    }

    return $content;

}
WebService-Flixster ( C/CJ/CJK/WebService-Flixster-0.02.tar.gz, CJK, 2012; MetaCPAN )
WebService-Flixster/lib/WebService/Flixster.pm ( view source; MetaCPAN )
w(Class::Accessor);

use Cache::FileCache;

use Carp;

use File::Spec::Functions qw(tmpdir);

use JSON;

use LWP::ConnCache;
use LWP::UserAgent;

use WebService::Flixster::Actor;
use WebService::Flixs
ecoded_json {
    my $self = shift;
    my $request = shift;

    my $content = $self->_response_decoded_content($request);

    my $json = JSON->new();
    $json->utf8(0);

    my $resp = $json->deco
AnyEvent-FreeSWITCH ( Q/QU/QUENTUS/AnyEvent-FreeSWITCH-0.01.tar.gz, QUENTUS, 2012; MetaCPAN )
AnyEvent-FreeSWITCH/lib/AnyEvent/FreeSWITCH.pm ( view source; MetaCPAN )
d $e ) {
	$self->event('recv_event', $e->getType(), $e->serialize('json'));
	$self->event('event_'. $e->getType(), $e->serialize('json'));
    } 
}

=head2 is_connected

=cut

sub is_connected {
    m
Games-Lacuna-Client ( H/HA/HALKEYE/Games-Lacuna-Client-0.003.tar.gz, HALKEYE, 2012; MetaCPAN )
Games-Lacuna-Client/lib/Games/Lacuna/Client/RPC.pm ( view source; MetaCPAN )
',
        fields      => [qw(code text)],
    },
);

use namespace::clean;

use Moose;

extends 'JSON::RPC::LWP';

has client => (
  is => 'ro',
  isa => 'Games::Lacuna::Client',
  required => 1,
  w
Games-Lacuna-Client ( H/HA/HALKEYE/Games-Lacuna-Client-0.003.tar.gz, HALKEYE, 2012; MetaCPAN )
Games-Lacuna-Client/ppm_install.pl ( view source; MetaCPAN )
se
DateTime
Exception::Class
FindBin
HTTP::Request
HTTP::Response
IO::Interactive
JSON::RPC::Common
JSON::RPC::LWP
LWP::UserAgent
Math::Round
MIME::Lite
Moose
Number::Format
Scalar::Util
Net-Stream ( R/RE/REDS/Net-Stream-0.28.tar.gz, REDS, 2012; MetaCPAN )
Net-Stream/Stream.pm ( view source; MetaCPAN )
package Net::Twitter::Stream;
use strict;
use warnings;
use IO::Socket;
use MIME::Base64;
use JSON;
use IO::Socket::SSL;

our $VERSION = '0.28';
1;

=head1 NAME

Using Twitter's streaming api.

=head1
2651' );

     sub got_tweet {
	 my ( $tweet, $json ) = @_;   # a hash containing the tweet
                                      # and the original json
	 print "By: $tweet->{user}{screen_name}\n";
	
/filter.json api call can be use to track up to 200 keywords
and to follow 200 users.

HTTP Basic authentication is supported (no OAuth yet) so you will need
a twitter account to connect.

JSON format
WebService-Embedly ( J/JW/JWIELAND/WebService-Embedly-0.06.tar.gz, JWIELAND, 2012; MetaCPAN )
WebService-Embedly/lib/WebService/Embedly.pm ( view source; MetaCPAN )
:Util::TypeConstraints';

#use Mouse;
#use Mouse::Util::TypeConstraints;

use LWP::UserAgent;
use JSON;
#use URI;
use URI::Escape;
use Ouch qw(:traditional);
use Regexp::Common qw /URI/;
our $VERSION 
veloper specifies in pixels.

=head3 format (default: json)

The response format – Accepted values: (xml, json)

=head3 callback

Returns a (jsonp) response format. The callback is the name of the j
rent.

=head3 allowscripts (default: false)

By default Embedly does not return script embeds for jsonp requests. They just don’t work and cause lots of issues. In some cases, you may need the scrip
Net-Twitter-Stream ( R/RE/REDS/Net-Twitter-Stream-0.28.tar.gz, REDS, 2012; MetaCPAN )
Net-Twitter-Stream/Stream.pm ( view source; MetaCPAN )
package Net::Twitter::Stream;
use strict;
use warnings;
use IO::Socket;
use MIME::Base64;
use JSON;
use IO::Socket::SSL;

our $VERSION = '0.28';
1;

=head1 NAME

Using Twitter's streaming api.

=head1
2651' );

     sub got_tweet {
	 my ( $tweet, $json ) = @_;   # a hash containing the tweet
                                      # and the original json
	 print "By: $tweet->{user}{screen_name}\n";
	
/filter.json api call can be use to track up to 200 keywords
and to follow 200 users.

HTTP Basic authentication is supported (no OAuth yet) so you will need
a twitter account to connect.

JSON format
WebService-Flixster ( C/CJ/CJK/WebService-Flixster-0.02.tar.gz, CJK, 2012; MetaCPAN )
WebService-Flixster/lib/WebService/Flixster/Actor.pm ( view source; MetaCPAN )
N) {
	$uri->path(sprintf("/iphone/api/v1/actors/%d.json", $self->_id()));
    } elsif ($page == PAGE_PHOTOS) {
	$uri->path("/iphone/api/v1/photos.json");
	$uri->query_form('actor' => $self->_id(), 'li
v1/actors/%d.json", $id));

 	my $content = $self->_ws()->_response_decoded_content(GET $uri->as_string());

 	if ($content =~ m/^\s*$/) {
 	    croak "Resource not found";
 	}

	my $json = $self->_ws
()->_response_decoded_json(GET $uri->as_string());

	if ($json->{'id'} ne $id) {
	    die "id failed round trip"
	}

	return $id;

    } elsif (exists $self->_q()->{'imdbid'}) {
	my $imdbid = $self->_
WebService-IMDB ( C/CJ/CJK/WebService-IMDB-0.05.tar.gz, CJK, 2012; MetaCPAN )
WebService-IMDB/lib/WebService/IMDB.pm ( view source; MetaCPAN )
he::FileCache;

use Carp;

use File::Spec::Functions qw(tmpdir);

use HTTP::Request::Common;

use JSON;

use LWP::ConnCache;
use LWP::UserAgent;

use WebService::IMDB::Title;
use WebService::IMDB::Nam
ecoded_json {
    my $self = shift;
    my $request = shift;

    my $content = $self->_response_decoded_content($request);

    my $json = JSON->new();
    $json->utf8(0);

    my $resp = $json->deco
hift;

    my $content = $self->_response_decoded_content($request);

    my $json = JSON->new();
    $json->utf8(0);

    my $resp = $json->decode($content);

    return $resp->{'copyright'};

}

1;

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.