Group
Extension

Matches 35359

Net-Pushover ( D/DV/DVINCI/Net-Pushover-0.021.tar.gz, DVINCI, 2016; MetaCPAN )
Net-Pushover/lib/Net/Pushover.pm ( view source; MetaCPAN )
 The Pushover API client implementation 

# pragmas
use 5.10.0;

# imports
use Moo;
use Carp;
use JSON;
use LWP::UserAgent;

# version
our $VERSION = 0.021;

# accessors
has token => (is => 'rw');

ha
g data
  my $res = $self->_ua->post(
    'https://api.pushover.net/1/messages.json', $args
  );

  return JSON::decode_json($res->decoded_content)
}

sub _auth_validation {
  my $self = shift;

  # au
nt>' 
  );

Method C<message> send a notification for an specificated user and returns 
decoded C<JSON> from API http response.

Official message API docs at L<https://pushover.net/api#messages> 


=h
Win32-HTA ( T/TO/TOMK/Win32-HTA-1.02.tar.gz, TOMK, 2016; MetaCPAN )
Win32-HTA/lib/Win32/HTA.pm ( view source; MetaCPAN )



    # AJAX communication
    require JSON;
    $hta->show(
        AJAX => sub {
            my($request) = @_;
            print JSON::encode_json($request);
            my $ok = int(rand(
(JSON::decode_json($rq_raw));

                my $reply = "HTTP/1.1 200 OK\n";
                $reply   .= "Content-Type: text/html; charset=utf-8\n\n";
                $reply   .= JSON::encode_json
  or die "Win32::Process is needed for ajax fuctionality\n";
        eval { require JSON }
            or die "JSON is needed for ajax fuctionality\n";

        Win32::Process::Create(
            m
Qiniu ( F/FU/FUKAI/Qiniu-0.07.tar.gz, FUKAI, 2016; MetaCPAN )
Qiniu/lib/Qiniu/Storage.pm ( view source; MetaCPAN )
  token     => $token,
        file => { 
            file => $local_file 
        }}
    )->res->json;
}

sub upload_data {
    my ($self, $token, $data, $key ) = @_;
    my $ua = Mojo::UserAgent->ne
n,
        file => { 
			filename => $key,
            content  => $data, 
        }}
    )->res->json;
}

sub upload_stream  {
    my ($self, $token, $local_file, $key, $mimetype) = @_;
    my $ua = 
on' => 'UpToken ' . $token,
                        }, 
                        $bput_data)->res->json;
            $ctx[$block_nu] = $result->{ctx};
        }
    }
    my $mkfile_api = $self->upapi 
Net-IPA ( N/NI/NICKCIS/Net-IPA-1.0.zip, NICKCIS, 2016; MetaCPAN )
Net-IPA/lib/Net/IPA/Response.pm ( view source; MetaCPAN )
# Net::IPA.pm -- Perl 5 interface of the (Free)IPA JSON-RPC API
#
#   for more information about this api see: https://vda.li/en/posts/2015/05/28/talking-to-freeipa-api-with-sessions/
#
#   written by
List-Objects-WithUtils ( A/AV/AVENJ/List-Objects-WithUtils-2.028003.tar.gz, AVENJ, 2016; MetaCPAN )
List-Objects-WithUtils/lib/List/Objects/WithUtils/Role/Array.pm ( view source; MetaCPAN )
) ? $coerced
      : Carp::confess "I should be unreachable!"
  } @vals
}


=for Pod::Coverage TO_JSON TO_ZPL damn type

=cut

sub type {
  # array() has an empty ->type
}

sub new { bless [ @_[1 .. $
module( $cls->inflated_type );
  $cls->inflated_type->new(@$self)
}

{ no warnings 'once'; 
  *TO_JSON  = *unbless; 
  *TO_ZPL   = *unbless;
  *damn     = *unbless; 
}
sub unbless { [ @{ $_[0] } ] }

e methods documented below, these objects provide a
C<TO_JSON> method exporting a plain ARRAY-type reference for convenience when
feeding L<JSON::Tiny> or similar, as well as a C<TO_ZPL> method for
co
Net-IPA ( N/NI/NICKCIS/Net-IPA-1.0.zip, NICKCIS, 2016; MetaCPAN )
Net-IPA/lib/Net/IPA.pm ( view source; MetaCPAN )
# Net::IPA.pm -- Perl 5 interface of the (Free)IPA JSON-RPC API
#
#   for more information about this api see: https://vda.li/en/posts/2015/05/28/talking-to-freeipa-api-with-sessions/
#
#   written by
e Net::IPA;

our $VERSION = '1.0';

=head1 NAME

Net::IPA.pm -- Perl 5 interface of the (Free)IPA JSON-RPC API

=head1 SYNOPSIS

  use Net::IPA;

  my $ipa = new Net::IPA(
    hostname => 'ipa.server.
se strict;
use Net::IPA::Methods;
use Net::IPA::Response;

use vars qw($AUTOLOAD);
use Carp;

use JSON;
use LWP::UserAgent; # http://search.cpan.org/~ether/libwww-perl-6.15/lib/LWP/UserAgent.pm
use LW
Net-IPA ( N/NI/NICKCIS/Net-IPA-1.0.zip, NICKCIS, 2016; MetaCPAN )
Net-IPA/lib/Net/IPA/Methods.pm ( view source; MetaCPAN )
# Net::IPA.pm -- Perl 5 interface of the (Free)IPA JSON-RPC API
#
#   for more information about this api see: https://vda.li/en/posts/2015/05/28/talking-to-freeipa-api-with-sessions/
#
#   written by
2, see LICENSE file for more information.

package Net::IPA::Methods;
use strict;

use JSON;

our $USE_RAW = JSON::true;

#** Ping request
#*
sub ping
{
	return {
		method => 'ping',
		params => [
			
	my ($user, %args) = @_;

	unless(%args){
		%args = (
			all => 0,
			no_members => JSON::false,
			pkey_only => JSON::false,
		);
	}

	$args{raw} = $USE_RAW unless(exists $args{raw});

	return {
		me
Net-Google-Analytics ( N/NW/NWELLNHOF/Net-Google-Analytics-3.05.tar.gz, NWELLNHOF, 2016; MetaCPAN )
Net-Google-Analytics/lib/Net/Google/Analytics.pm ( view source; MetaCPAN )
rict;
use warnings;

# ABSTRACT: Simple interface to the Google Analytics Core Reporting API

use JSON;
use LWP::UserAgent;
use Net::Google::Analytics::Request;
use Net::Google::Analytics::Response;
u
http_res->decoded_content);
        return $res;
    }

    my $json = from_json($http_res->decoded_content);
    $res->_parse_json($json);

    $res->start_index($start_index);
    $res->is_success(1
TOML ( K/KA/KARUPA/TOML-0.97.tar.gz, KARUPA, 2016; MetaCPAN )
TOML/lib/TOML.pm ( view source; MetaCPAN )
 ); # SvTYPE is IV or NV?

    my $type = ref($value);
    if (!$type) {
        return string_to_json($value);
    } elsif ($type eq 'ARRAY') {
        return sprintf('[%s]', join(", ", map { _serial
\f',
    "\b" => '\b',
    "\"" => '\"',
    "\\" => '\\\\',
    "\'" => '\\\'',
);
sub string_to_json {
    my ($arg) = @_;

    $arg =~ s/([\x22\x5c\n\r\t\f\b])/$esc{$1}/g;
    $arg =~ s/([\x00-\x08
WebService-TDWTF ( M/MG/MGV/WebService-TDWTF-0.003.tar.gz, MGV, 2016; MetaCPAN )
WebService-TDWTF/lib/WebService/TDWTF.pm ( view source; MetaCPAN )
00;
use strict;
use warnings;
use parent qw/Exporter/;

use Carp;
use HTTP::Tiny;
use JSON::MaybeXS qw/decode_json/;
use Scalar::Util qw/looks_like_number/;
use WebService::TDWTF::Article;

my @subs =
nse = $ht->get($url);
	croak $response->{reason} unless $response->{success};
	$response = decode_json $response->{content};
	croak $response->{Status} if ref $response eq 'HASH' && !exists $response-
WebService-TDWTF ( M/MG/MGV/WebService-TDWTF-0.003.tar.gz, MGV, 2016; MetaCPAN )
WebService-TDWTF/lib/WebService/TDWTF/Article.pm ( view source; MetaCPAN )
L<WebService::TDWTF>. Each such object is guaranteed to
be a blessed hashref corresponding to the JSON returned by the TDWTF
API (possibly with some extra keys), so the data inside can be
obtained by 
Net-Google-Analytics ( N/NW/NWELLNHOF/Net-Google-Analytics-3.05.tar.gz, NWELLNHOF, 2016; MetaCPAN )
Net-Google-Analytics/lib/Net/Google/Analytics/Response.pm ( view source; MetaCPAN )
}

sub _parse_json {
    my ($self, $json) = @_;

    $self->items_per_page($json->{itemsPerPage});
    $self->total_results($json->{totalResults});
    $self->contains_sampled_data($json->{containsSa
a});
    $self->profile_info($json->{profileInfo});

    my $json_totals = $json->{totalsForAllResults};
    my %totals;

    while (my ($json_name, $total) = each(%$json_totals)) {
        my $column
al;
    }

    $self->_totals(\%totals);

    my @column_headers;

    for my $column_header (@{ $json->{columnHeaders} }) {
        push(@column_headers, {
            name        => _parse_column_na
Net-Google-Analytics ( N/NW/NWELLNHOF/Net-Google-Analytics-3.05.tar.gz, NWELLNHOF, 2016; MetaCPAN )
Net-Google-Analytics/lib/Net/Google/Analytics/OAuth2.pm ( view source; MetaCPAN )
h2::VERSION = '3.05';
use strict;
use warnings;

# ABSTRACT: OAuth2 for Google Analytics API

use JSON;
use LWP::UserAgent;
use URI;

sub new {
    my $class = shift;
    my $self  = { @_ };

    die(
;

    die('error getting token: ' . $res->status_line) unless $res->is_success;

    return from_json($res->decoded_content);
}

sub refresh_access_token {
    my ($self, $refresh_token) = @_;

    m
;

    die('error getting token: ' . $res->status_line) unless $res->is_success;

    return from_json($res->decoded_content);
}

sub interactive {
    my $self = shift;

    my $url = $self->authoriz
Spek ( M/ME/MELEZHIK/Spek-0.0.9.tar.gz, MELEZHIK, 2016; MetaCPAN )
Spek/README.pod ( view source; MetaCPAN )
es> documentation to know more about swat meta stories.


=head1 Advanced usage


=head2 handling json responses

Modify Kelp controller


=head3 GET /user/id

    $ cat user/id/get.pm
    
    my ($s
$id}->{age}
    }

Add json handler to swat test:

    $ cat user/id/get.handler
    
    my $headers   = shift;
    my $body      = shift;
    use JSON;
    $hash = decode_json($body);
    return "$h
TOML ( K/KA/KARUPA/TOML-0.97.tar.gz, DARREN, 2016; MetaCPAN )
TOML/TOML.pm ( view source; MetaCPAN )
); # SvTYPE is IV or NV?

    my $type = ref($value); 
    if (!$type) {
        return string_to_json($value);
    } elsif ($type eq 'ARRAY') {
        return sprintf('[%s]', join(", ", map { _serial
\f',
    "\b" => '\b',
    "\"" => '\"',
    "\\" => '\\\\',
    "\'" => '\\\'',
);
sub string_to_json {
    my ($arg) = @_;

    $arg =~ s/([\x22\x5c\n\r\t\f\b])/$esc{$1}/g;
    $arg =~ s/\//\\\//g i
Ovirt ( H/HE/HEINCE/Ovirt-0.06.tar.gz, HEINCE, 2016; MetaCPAN )
Ovirt/lib/Ovirt.pm ( view source; MetaCPAN )
kage Ovirt;

use v5.10;
use LWP::UserAgent;
use Scalar::Util qw(looks_like_number);
use Carp;
use JSON;
use XML::LibXML;
use URI::Escape;
use Moo::Role;

=head1 NAME

Ovirt - Bindings for oVirt REST A
 => 'ovirt-mgr.example.com',
            api_output              => 'xml', # optional, default to json
            vm_output_attrs         => 'id,name,state,description', # optional
            cluste
;
 my $host       = Ovirt::Host       ->new(%con);

 # return xml output / json
 print $vm->list_xml;   
 print $vm->list_json;                           

 # list attributes based on 'vm_output_attrs
Spek ( M/ME/MELEZHIK/Spek-0.0.9.tar.gz, MELEZHIK, 2016; MetaCPAN )
Spek/lib/Spek.pm ( view source; MetaCPAN )
es> documentation to know more about swat meta stories.


=head1 Advanced usage


=head2 handling json responses

Modify Kelp controller


=head3 GET /user/id

    $ cat user/id/get.pm
    
    my ($s
$id}->{age}
    }

Add json handler to swat test:

    $ cat user/id/get.handler
    
    my $headers   = shift;
    my $body      = shift;
    use JSON;
    $hash = decode_json($body);
    return "$h
Ovirt ( H/HE/HEINCE/Ovirt-0.06.tar.gz, HEINCE, 2016; MetaCPAN )
Ovirt/lib/Ovirt/VM.pm ( view source; MetaCPAN )
 '||', # optional
 );

 my $vm = Ovirt::VM->new(%con);

 # return xml / json output
 print $vm->list_xml; 
 print $vm->list_json;
 
 # list vm separated by new line
 # return attributes specified on '
WWW-Xunlei ( Z/ZS/ZSHENGLI/WWW-Xunlei-0.2.tar.gz, ZSHENGLI, 2016; MetaCPAN )
WWW-Xunlei/lib/WWW/Xunlei.pm ( view source; MetaCPAN )
::Xunlei;

use strict;
use warnings;

use LWP::UserAgent;
use HTTP::Request;
use URI::Escape;
use JSON;

use File::Basename;
use File::Path qw/mkpath/;
use Time::HiRes qw/gettimeofday/;
use POSIX qw/s
shift;
    my ( $user, $pass, %options ) = @_;
    my $self = {
        'ua'   => undef,
        'json' => undef,
        'user' => $user,
        'pass' => md5pass($pass),
    };

    my $cookie_file
_jar( { file => $cookie_file } );
    $self->{'ua'}->agent(DEFAULT_USER_AGENT);

    $self->{'json'} = JSON->new->allow_nonref;

    bless $self, $class;
    return $self;
}

sub get_downloaders {
   
CloudFlare-Client ( P/PW/PWR/CloudFlare-Client-v0.55.5-TRIAL.tar.gz, PWR, 2016; MetaCPAN )
CloudFlare-Client/lib/CloudFlare/Client.pm ( view source; MetaCPAN )
nt 6.02;
# This isn't used directly but we want the dependency
use LWP::Protocol::https 6.02;
use JSON::MaybeXS;

our $VERSION = 'v0.55.5'; # TRIAL VERSION

# CF credentials
has '_user' => (
    is   
, can throw exceptions under ::Exception::
Readonly my $CF_URL => 'https://www.cloudflare.com/api_json.html';
method _apiCall ( $act is ro, %args is ro ) {
    # query cloudflare
    Readonly my $res 
d',)
        unless $res->is_success;
    # Handle errors from CF
    Readonly my $info => decode_json($res->decoded_content);
    CloudFlare::Client::Exception::Upstream::->throw(
        errorCode =

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