Group
Extension

Matches 35359

Plagger-Plugin-Notify-Slack ( Z/ZO/ZONCOEN/Plagger-Plugin-Notify-Slack-0.03.tar.gz, ZONCOEN, 2014; MetaCPAN )
Plagger-Plugin-Notify-Slack/lib/Plagger/Plugin/Notify/Slack.pm ( view source; MetaCPAN )
strict;
use warnings;
use base qw( Plagger::Plugin );

use LWP::UserAgent;
use Encode;
use JSON qw(encode_json);

our $VERSION = "0.03";

sub register {
    my ( $self, $context ) = @_;
    $context->


    my $ua = LWP::UserAgent->new;
    my $res = $ua->post( $self->{remote}, [ payload => encode_json($payload) ] );

    unless ( $res->is_success ) {
        $context->log( error => "Notiying to Sl
Ceph-RadosGW-Admin ( C/CR/CREIN/Ceph-RadosGW-Admin-0.4.tar.gz, CREIN, 2014; MetaCPAN )
Ceph-RadosGW-Admin/lib/Ceph/RadosGW/Admin.pm ( view source; MetaCPAN )
 '0.4';
use strict;
use warnings;

use LWP::UserAgent;
use Ceph::RadosGW::Admin::HTTPRequest;
use JSON;
use Moose;
use URI;
use URI::QueryParam;
use Ceph::RadosGW::Admin::User;
use namespace::autoclea
thod, $path, %args) = @_;
	
	my $content = '';

	my $query_string = _make_query(%args, format => 'json');
	
	my $request_builder = Ceph::RadosGW::Admin::HTTPRequest->new(
		method     => $method,
		pa
line, $res->content, $req->as_string);
	}
    
	if ($res->content) {
		my $data = eval {
			JSON::decode_json($res->content);
		};
	
		if (my $e = $@) {
			die "Could not deserialize server response: 
Acme-Rando ( C/CR/CREIN/Acme-Rando-0.1.tar.gz, CREIN, 2014; MetaCPAN )
Acme-Rando/lib/Acme/Rando.pm ( view source; MetaCPAN )
ackage Acme::Rando;
$Acme::Rando::VERSION = '0.1';
use strict;
use warnings;

use HTTP::Tiny;
use JSON;

use parent 'Exporter';
our @EXPORT = qw(rando);


  
=head1 NAME

Acme::Rando - Get a Random St
andom?source=starwars&format=json');
	
	unless ($res->{success}) {
		return "These aren't the droids you're looking for: $res->{reason}"
	}
	
	my $dat  = JSON::decode_json($res->{content});
	
	return 
Dancer-Plugin-CRUD ( Z/ZU/ZURBORG/Dancer-Plugin-CRUD-1.031.tar.gz, ZURBORG, 2014; MetaCPAN )
Dancer-Plugin-CRUD/lib/Dancer/Plugin/CRUD.pm ( view source; MetaCPAN )
X = '_id';

my $content_types = {
    json  => 'application/json',
    yml   => 'text/x-yaml',
    xml   => 'application/xml',
    dump  => 'text/x-perl',
    jsonp => 'text/javascript',
};

my %trigg
ub () {
    my $conf        = plugin_setting;
    my $serializers = {
        'json'  => 'JSON',
        'jsonp' => 'JSONP',
        'yml'   => 'YAML',
        'xml'   => 'XML',
        'dump'  => 'Du
$routes{$action} } => $triggers_map{get}
                  ->( qr{$route/\Q$action\E\.(?<format>json|jsonp|yml|xml|dump)}
                      => $sub );
                push @{ $routes{$action} } =>
Web-Dash ( T/TO/TOSHIOITO/Web-Dash-0.041.tar.gz, TOSHIOITO, 2014; MetaCPAN )
Web-Dash/lib/Web/Dash/WebAPI.pod ( view source; MetaCPAN )
N

This document describes Web API provided by L<Web::Dash>.

=head1 ENDPOINT

=head2 GET /search.json

Makes a search with a Lens and returns the search results.

B<Query Parameters>

=over

=item C<
onse is a JSON object.
The C<error> attribute of the object is C<null>,
and the C<results> attribute of the object is an array of search results.

Each entry in the C<results> array is a JSON object r
response is a JSON object.
The C<error> attribute of the object describes the cause of the error.

B<Example>

Request to L<Wikipedia|http://en.wikipedia.org/> Lens.

    GET /search.json?lens=net.lau
CPAN-Testers-WWW-Reports-Query-Reports ( B/BA/BARBIE/CPAN-Testers-WWW-Reports-Query-Reports-0.10.tar.gz, BARBIE, 2014; MetaCPAN )
CPAN-Testers-WWW-Reports-Query-Reports/lib/CPAN/Testers/WWW/Reports/Query/Reports.pm ( view source; MetaCPAN )
------------------------------------------------------
# Library Modules

use WWW::Mechanize;
use JSON::XS;

#----------------------------------------------------------------------------
# Variables

 $mech->content;
}

sub _parse {
    my $self    = shift;
    my $data;
    eval { $data = decode_json($self->{content}) };
    return $data    unless($@ || !$data);

    $self->{error} = $@ || 'no da
Mojo-JSONXS ( J/JZ/JZAWODNY/Mojo-JSONXS-0.001-TRIAL.tar.gz, JZAWODNY, 2014; MetaCPAN )
Mojo-JSONXS/lib/Mojo/JSONXS.pm ( view source; MetaCPAN )
ge Mojo::JSONXS;

# ABSTRACT: provide faster JSON for Mojolicious apps using Cpanel::JSON::XS


use Cpanel::JSON::XS;
use Mojo::JSON;
use Mojo::Util 'monkey_patch';

my $BINARY = Cpanel::JSON::XS->new
el::JSON::XS->new->utf8(0)->allow_nonref(1)->allow_blessed(1)->convert_blessed(1);

monkey_patch 'Mojo::JSON', 'encode_json', sub { $BINARY->encode(shift) };
monkey_patch 'Mojo::JSON', 'decode_json', 
atch 'Mojo::JSON', 'to_json',   sub { $TEXT->encode(shift) };
monkey_patch 'Mojo::JSON', 'from_json', sub { $TEXT->decode(shift) };

monkey_patch 'Mojo::JSON', 'true()',  sub { Cpanel::JSON::XS::true(
Plack-Middleware-Session-Simple-JWSCookie ( R/RI/RITOU/Plack-Middleware-Session-Simple-JWSCookie-0.01.tar.gz, RITOU, 2014; MetaCPAN )
Plack-Middleware-Session-Simple-JWSCookie/lib/Plack/Middleware/Session/Simple/JWSCookie.pm ( view source; MetaCPAN )
le);
use Digest::SHA1 qw//;
use Cookie::Baker;
use Plack::Util;
use Scalar::Util qw/blessed/;
use JSON::WebToken qw/encode_jwt decode_jwt/;
use Plack::Util::Accessor qw/
    alg
    secret
/;

sub pre
ding utf-8

=head1 NAME

Plack::Middleware::Session::Simple::JWSCookie - Session::Simple with JWS(JSON Web Sigmature) Cookie

=head1 SYNOPSIS

    use Plack::Middleware::Session::Simple::JWSCookie;

 
Plack::Middleware::Session::Simple.

Session cookie include session metadata with signature using JSON Web Signature.
The session cookie prevents manipulation of the session ID,
and can detect the inv
Labyrinth-Plugin-Survey ( B/BA/BARBIE/Labyrinth-Plugin-Survey-0.08.tar.gz, BARBIE, 2014; MetaCPAN )
Labyrinth-Plugin-Survey/vhost/toolkit/notify/act-addusers.pl ( view source; MetaCPAN )
E/plugins" );
use utf8;

use Crypt::Lite;
use Digest::SHA1  qw(sha1_hex);
use HTML::Entities;
use JSON;
use WWW::Mechanize;

use Labyrinth::Globals;
use Labyrinth::Variables;

#-----------------------
content=".Dumper($mech->content());


## Process data

#my $data = from_json($mech->content(), {utf8 => 1});
my $data = from_json($mech->content());

#print STDERR "data=".Dumper($data);

my ($found,$
Finance-Bitcoin-Yacuna ( M/MA/MARTCHOUK/Finance-Bitcoin-Yacuna-0.2.tar.gz, MARTCHOUK, 2014; MetaCPAN )
Finance-Bitcoin-Yacuna/lib/Finance/Bitcoin/Yacuna.pm ( view source; MetaCPAN )
Path, ["param1=$param1", "param2=$param2", ..]);

 use Data::Dump qw(dump);
 use JSON;
 my $json = new JSON;
 dump $json->decode($result);

=head1 DESCRIPTION

The module to connect to the api of the 
I method C<$restPath> (with the given C<$params>, where applicable) and returns either undef or a JSON string.

=back

=head1 DEPENDENCIES

=over 8

=item L<WWW::Mechanize>

=item L<HTTP::Request>

=i
Labyrinth-Plugin-Survey ( B/BA/BARBIE/Labyrinth-Plugin-Survey-0.08.tar.gz, BARBIE, 2014; MetaCPAN )
Labyrinth-Plugin-Survey/vhost/toolkit/notify/act-addtalks.pl ( view source; MetaCPAN )
-
# Library Modules

use lib ( "$BASE/lib", "$BASE/plugins" );
use utf8;

use HTML::Entities;
use JSON;
use WWW::Mechanize;
use Time::Local;

use Labyrinth::Globals;
use Labyrinth::Variables;

#------
content=".Dumper($mech->content());


## Process data

#my $data = from_json($mech->content(), {utf8 => 1});
my $data = from_json($mech->content());

#print STDERR "data=".Dumper($data);

my %counts =
BusyBird ( T/TO/TOSHIOITO/BusyBird-0.12.tar.gz, TOSHIOITO, 2014; MetaCPAN )
BusyBird/lib/BusyBird/Main/PSGI/View.pm ( view source; MetaCPAN )
qw(set_param split_with_entities);
use Carp;
use Try::Tiny;
use Scalar::Util qw(weaken);
use JSON qw(to_json);
use Text::Xslate qw(html_builder html_escape);
use File::Spec;
use Encode ();
use JavaScr
te => 'error.tx', args => {error => $message},
        code => $http_code
    );
}


sub response_json {
    my ($self, $res_code, $response_object) = @_;
    my $message = try {
        die "response
}
        to_json($response_object, {ascii => 1})
    }catch {
        undef
    };
    if(defined($message)) {
        return [
            $res_code, ['Content-Type' => 'application/json; charset=ut
Labyrinth-Plugin-Survey ( B/BA/BARBIE/Labyrinth-Plugin-Survey-0.08.tar.gz, BARBIE, 2014; MetaCPAN )
Labyrinth-Plugin-Survey/lib/Labyrinth/Plugin/Survey/Act/API.pm ( view source; MetaCPAN )
e Labyrinth::Variables;

use Crypt::Lite;
use Digest::SHA1  qw(sha1_hex);
use HTML::Entities;
use JSON;
use Time::Local;
use WWW::Mechanize;

#---------------------------------------------------------
ODS

=over 4

=item LoadUsers

Builds the API call to retrieve the users, and stores the returned JSON into
the database, referencing all the users within Act, who have been recorded as
a speaker and/
LoadTalks

Builds he API call to retrieve the talks for the conference event. Parses the
returned JSON, filtering the talks based on day, room and type into specific
categories and stores within the d
BusyBird ( T/TO/TOSHIOITO/BusyBird-0.12.tar.gz, TOSHIOITO, 2014; MetaCPAN )
BusyBird/lib/BusyBird/Main/PSGI.pm ( view source; MetaCPAN )
imple;
use Plack::Request;
use Plack::Builder ();
use Plack::App::File;
use Try::Tiny;
use JSON qw(decode_json);
use Scalar::Util qw(looks_like_number);
use List::Util qw(min);
use Carp;
use Exporter 
;
    $tl_mapper->connect('/statuses.json',
                        {method => '_handle_tl_post_statuses'}, {method => 'POST'});
    $tl_mapper->connect('/ack.json',
                        {method =>
 '_handle_tl_ack'}, {method => 'POST'});
    $tl_mapper->connect('/updates/unacked_counts.json',
                        {method => '_handle_tl_get_unacked_counts'}, {method => 'GET'});
    $tl_mapper
BusyBird ( T/TO/TOSHIOITO/BusyBird-0.12.tar.gz, TOSHIOITO, 2014; MetaCPAN )
BusyBird/lib/BusyBird/Manual/Tutorial.pod ( view source; MetaCPAN )
/timelines/home/statuses.json

C<< POST /timelines/home/statuses.json >> endpoint inputs statuses to the "home" timeline.
Statuses are in the HTTP request body, encoded in JSON.

You can input more th
o, Alice!", "user":{"screen_name":"Bob"}}]' \
      http://127.0.0.1:5000/timelines/home/statuses.json

This time, the statuses have C<user.screen_name> fields.
L<BusyBird> renders this field as the p
bird_input_feed https://metacpan.org/feed/recent -p http://127.0.0.1:5000/timelines/home/statuses.json

=back

After that, you can see the imported feed items (in this case, Perl modules recently uplo
BusyBird ( T/TO/TOSHIOITO/BusyBird-0.12.tar.gz, TOSHIOITO, 2014; MetaCPAN )
BusyBird/lib/BusyBird.pm ( view source; MetaCPAN )
 a status

    $ curl -d '{"text":"hello, world!"}' http://localhost:5000/timelines/home/statuses.json

=back

See L<BusyBird::Manual::Tutorial> for detail.

=head1 DOCUMENTATION

=over

=item L<BusyB
BusyBird ( T/TO/TOSHIOITO/BusyBird-0.12.tar.gz, TOSHIOITO, 2014; MetaCPAN )
BusyBird/lib/BusyBird/Manual/WebAPI.pod ( view source; MetaCPAN )
quests with the message body,
data format of the body must be JSON encoded by UTF-8,
so C<Content-Type> header should be C<application/json; charset=utf-8>.

The data format of HTTP responses is deter
=item C<timeline> = STR (required)

Timeline name.

=item C<format> = {json,html} (required)

Response format. It is either C<json> or C<html>.

If C<html> format is specified, the response message is
s C<json>.
It is useful when you transfer statuses from one L<BusyBird> instance to another.

=back

B<Response>

In success, the HTTP response code is 200.

=over

=item *

If C<format> is C<json> an
TestLink-API ( T/TE/TEODESIAN/TestLink-API-0.011.tar.gz, TEODESIAN, 2014; MetaCPAN )
TestLink-API/lib/TestLink/API.pm ( view source; MetaCPAN )
d it's tests/attachments in an array of HASHREFs.
The idea would be that you then could encode as JSON/XML as a backup, or to facilitate migration to other systems.

The project hashes will be what yo
Web-Dash ( T/TO/TOSHIOITO/Web-Dash-0.041.tar.gz, TOSHIOITO, 2014; MetaCPAN )
Web-Dash/lib/Web/Dash.pm ( view source; MetaCPAN )
Web::Dash::Lens;
use Encode;
use Future::Q 0.012;
use AnyEvent::DBus 0.31;
use AnyEvent;
use JSON qw(to_json);
use Try::Tiny;
use Carp;

my $index_page_template = <<'EOD';
<!DOCTYPE html>
<html>
  <he
ng) {
        return $.ajax({
            url: "search.json",
            data: { lens: lens_name, q: query_string },
            dataType: "json",
            type: 'GET',
        }).then(null, funct
in'],
                [Encode::encode('utf8', $error)]
            ]);
        });
    };
}

sub _json_response {
    my ($response_object, $code) = @_;
    if(!defined($code)) {
        $code = $resp
BusyBird ( T/TO/TOSHIOITO/BusyBird-0.12.tar.gz, TOSHIOITO, 2014; MetaCPAN )
BusyBird/lib/BusyBird/Manual/Status.pod ( view source; MetaCPAN )
BusyBird::Manual::Status - Status object specification

=head1 SYNOPSIS

    use JSON;
    
    my $status = decode_json(<<'STATUS');
    {
        "id": "http://api.example.com/2291",
        "create
in JSON format). It should be serializable to
JSON and deserializable from JSON.


=head1 FIELDS

The following fields in a status object is used by BusyBird.

Note that the following list uses JSON f

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