Group
Extension

Matches 35359

Imgur-API ( M/ML/MLHOLLEN/Imgur-API-0.1.3.tar.gz, MLHOLLEN, 2017; MetaCPAN )
Imgur-API/scripts/scrape_endpoints.pl ( view source; MetaCPAN )

use strict;
use feature qw(say);
use Web::Scraper;
use URI;
use Data::Dumper;
use JSON::XS;
use HTML::TreeBuilder::LibXML;
use LWP::UserAgent;
use HTTP::Message;
use Template;

my $template = Templat
q('$_')} @urlparams_opt),
		};
		push(@{$api->{$endpoint}},$details);
	}
}

my $json =  JSON::XS->new->pretty;
say $json->encode($api);


sub get_page {
	my ($url) = @_;

	my $ua = LWP::UserAgent->new
Sah-Examples ( P/PE/PERLANCAR/Sah-Examples-0.05.tar.gz, PERLANCAR, 2017; MetaCPAN )
Sah-Examples/lib/Sah/Examples.pm ( view source; MetaCPAN )
e dir.

This POD also contains examples of schemas.

=head1 EXAMPLES

The examples are written in JSON with Javascript-style comments (C<// comment>).

=head2 Various simple examples

 // integer, opt
Net-Async-Graphite ( C/CH/CHOHAG/Net-Async-Graphite-0.1_1.tar.gz, CHOHAG, 2017; MetaCPAN )
Net-Async-Graphite/lib/Net/Async/Graphite/JSONCodec.pm ( view source; MetaCPAN )
te::JSONCodec;

our $VERSION = '0.1_1';

use v5.14;
use strictures 2;
use Moo::Role;
use Carp;

use JSON ();
use namespace::clean;

=item _json (read-only)

A L<JSON> codec object.

=cut

has _json =>
 is => lazy => init_arg => undef, builder => sub {
  JSON->new->utf8->allow_blessed(1)
};

1;
Minion-Backend-Pg91 ( V/VI/VIKAS/Minion-Backend-Pg91-6.05.tar.gz, VIKAS, 2017; MetaCPAN )
Minion-Backend-Pg91/lib/Minion/Backend/Pg91.pm ( view source; MetaCPAN )
package Minion::Backend::Pg91;
use Mojo::Base 'Minion::Backend';

use Mojo::IOLoop;
use Mojo::JSON qw(j);
use Mojo::Pg;
use Sys::Hostname 'hostname';
use Carp 'croak';
use Mojo::Util qw(dumper);

our 
, task)
     values (?, ?, (now() + (interval '1 second' * ?)), ?, ?, ?, ?)
     returning id", { json => $args }, $options->{attempts} // 1,
    $options->{delay} // 0, $options->{parents} // [],
   
 now(), status = ? where id = ? returning 1';
  return $id if $id && $self->pg->db->query($sql, { json => $options->{status} // {} }, $id)->rows;

  $sql = q{insert into minion_workers (id, host, pid,
Net-Async-Graphite ( C/CH/CHOHAG/Net-Async-Graphite-0.1_1.tar.gz, CHOHAG, 2017; MetaCPAN )
Net-Async-Graphite/lib/Net/Async/Graphite.pm ( view source; MetaCPAN )
ost of the
functionality of C</render>, C</metrics/expand>, C</metrics/find> and
C</metrics/index.json> which is described in detail in
L<Net::Async::Graphite::API>.

There is also support to pass the
Net-Async-Graphite ( C/CH/CHOHAG/Net-Async-Graphite-0.1_1.tar.gz, CHOHAG, 2017; MetaCPAN )
Net-Async-Graphite/lib/Net/Async/Graphite/API.pm ( view source; MetaCPAN )
HTTPClient>.

JSON data is decoded using a L<JSON> object handled by
L<Net::Async::Graphite::JSONCodec>.

=cut

with 'Net::Async::Graphite::HTTPClient';

with 'Net::Async::Graphite::JSONCodec';

=head

=item find

=item expand

=item index[.json]

C</metrics/index.json> can be requested with C<$method> of C<index> or
C<index.json> because requiring the C<.json> suffix is silly. Also I
can consider 
llowed_metrics_params{'index.json'} = $allowed_metrics_params{index}; # FFS

sub metrics {
  my $self = shift;
  my ($method, $query, %extra) = @_;
  $method = 'index.json' if $method eq 'index';
  re
Imgur-API ( M/ML/MLHOLLEN/Imgur-API-0.1.3.tar.gz, MLHOLLEN, 2017; MetaCPAN )
Imgur-API/lib/Imgur/API/Endpoint/Gallery.pod ( view source; MetaCPAN )
mages in the gallery. For example the main gallery is https://api.imgur.com/3/gallery/hot/viral/0.json

=back

B<Parameters>

=over 4


=item *
 C<sort> I<optional>

viral | top | time | rising (only 
Eixo-Docker ( A/AL/ALAMBIKE/Eixo-Docker-1.211.tar.gz, ALAMBIKE, 2017; MetaCPAN )
Eixo-Docker/lib/Eixo/Docker/Config.pm ( view source; MetaCPAN )
#          ],
# 'Cpuset' => '',
# 'MemorySwap' => 0,
# 'AttachStdin' => bless( do{\(my $o = 1)}, 'JSON::XS::Boolean' ),
# 'AttachStderr' => $VAR1->{'Config'}{'AttachStdin'},
# 'CpuShares' => 0,
# 'Ope
Mojar-Google-Analytics ( N/NI/NICZERO/Mojar-Google-Analytics-1.112.tar.gz, NICZERO, 2017; MetaCPAN )
Mojar-Google-Analytics/test/20-auth.t ( view source; MetaCPAN )
'JWT',
    alg => 'RS256'
  };
  my $t = Mojo::JSON->new->encode($s);
  require Data::Dump;
  say Data::Dump::dump($t);
  say Data::Dump::dump(Mojo::JSON->new->decode($t));
  say MIME::Base64::encode_
base64url($t);
  my $a = 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9';
  say Data::Dump::dump(Mojo::JSON->new->decode(MIME::Base64::decode_base64url($a)));
}

subtest q{header} => sub {
  ok $jwt->header, '
ate_key => path('data/privatekey.pem')->slurp)), 'decode(encode())';
  delete @$jwt{qw( header body signature json cipher private_key )};
  is_deeply $jwt2, $jwt, 'Round trip';
};
};

done_testing();
Yandex-Translate ( B/BR/BRNFLK/Yandex-Translate-1.002.tar.gz, BRNFLK, 2017; MetaCPAN )
Yandex-Translate/lib/Yandex/Translate.pm ( view source; MetaCPAN )

use strict;
use warnings;
use utf8;

use HTML::Entities qw{encode_entities};
use HTTP::Tiny;
use JSON;
use POSIX qw{:locale_h};
use URI::Escape qw{uri_escape_utf8};

#
# The “my” keyword is on a 

        _options_    => shift,
        _base_       => 'https://translate.yandex.net/api/v1.5/tr.json',
        _post_       => undef,
	_http_       => HTTP::Tiny->new
    };

    $self->{_text_} = u
sponse->{content}) {
        my $json_respond = JSON->new->utf8->decode($response->{content});
        return (wantarray) ? @{ $json_respond->{dirs} } : scalar(@{ $json_respond->{dirs} });
    }
}

su
App-Repo ( Z/ZD/ZDENEK/App-Repo-0.11.tar.gz, ZDENEK, 2017; MetaCPAN )
App-Repo/lib/App/Repo/Agent.pm ( view source; MetaCPAN )
se Digest::SHA qw< sha1_hex sha256_hex >;
use Digest::MD5 qw< md5_hex >;
use Term::ANSIColor;
use JSON::PP;
use File::Path;
use File::Find;
use File::Copy;

use warnings;
use strict;

=head1 NAME
 
Ap
;

sub read_json {
    open(my $fh,"<", "$base_path/packages.json") || die "cant open: $base_path/packages.json: $!";
    my $json = <$fh>;
    my $p = decode_json $json;
}

sub write_json {
    my @p
et_packages(shift)};
    my $json = encode_json \@p;
    open(my $fh,">", "$base_path/packages.json") || die "cant open: $base_path/packages.json: $!";
    print $fh $json;
}

sub printer {
    my @p 
Mojar-Google-Analytics ( N/NI/NICZERO/Mojar-Google-Analytics-1.112.tar.gz, NICZERO, 2017; MetaCPAN )
Mojar-Google-Analytics/lib/Mojar/Google/Analytics/Response.pm ( view source; MetaCPAN )
;

  if ($res->is_success) {
    delete @$self{qw(code content error message)};
    my $j = $res->json;
    $self->{snakecase($_)} = $j->{$_} for keys %$j;
    return $self->success(1);
  }
  else {
 
sprintf 'Error (%u): %s', $_[0]->code, $_[0]->message);

    if ($res and my $j = $res->json) {
      # Got JSON body in response
      $self->content($j);
      my $m = ref($j->{error}) ? $j->{error}
Yandex-Dictionary ( B/BR/BRNFLK/Yandex-Dictionary-0.02.tar.gz, BRNFLK, 2017; MetaCPAN )
Yandex-Dictionary/lib/Yandex/Dictionary.pm ( view source; MetaCPAN )

use strict;
use warnings;
use utf8;

use HTML::Entities qw{encode_entities};
use HTTP::Tiny;
use JSON;
use POSIX qw{:locale_h};
use URI::Escape qw{uri_escape_utf8};

my
$VERSION = '0.02';

my %valid_
ult_ui = map { $_ => 1 } qw{ en ru tr };

my %valid_format = map { $_ => 1 } qw{ json xml };

my $default_format = 'json';

my $james_axl_result = sub
{
    my $self = shift;
    die "You must set API
$self->{_lang_}.'&ui='.$self->{_ui_};
    my $response = $self->{_http_}->get($self->{_base_} . '.json' . $query . $post);
    die "Invalid API key.\n" if ($response->{status} eq '401');
    die "Bloc
WWW-Google-Translate ( D/DY/DYLAN/WWW-Google-Translate-0.10.tar.gz, DYLAN, 2017; MetaCPAN )
WWW-Google-Translate/lib/WWW/Google/Translate.pm ( view source; MetaCPAN )
e warnings;
{
    use URI;
    use Carp;
    use Readonly;
    use LWP::UserAgent;
    use JSON qw( from_json );
    use Storable qw( store retrieve );
    use HTTP::Status qw( HTTP_BAD_REQUEST );
   

        if !$self{key};

    croak "data_format must either be Perl or JSON"
        if $self{data_format} !~ m{\A (?: perl|json ) \z}xmsi;

    $self{ua} = LWP::UserAgent->new();
    $self{ua}->agen
\%form );

        $response = $self->{ua}->get($uri);
    }

    my $json = $response->content() || "";

    my ($message) = $json =~ m{ "message" \s* : \s* "( [^"]+ )" }xms;

    $message ||= $respo
geoip ( D/DA/DANNYT/geoip.tar.gz, DANNYT, 2017; MetaCPAN )
geoip/lib/geoip.pm ( view source; MetaCPAN )
.com/json/$ip";
	
	my $response = $self->dispatch(url => $url ,method => 'GET');
	my $status = $response->status_line;			
	my $json_response = $response->decoded_content;          

	
return $json_res
WWW-Google-Translate ( D/DY/DYLAN/WWW-Google-Translate-0.10.tar.gz, DYLAN, 2017; MetaCPAN )
WWW-Google-Translate/lib/WWW/Google/Translate.pod ( view source; MetaCPAN )


=item data_format

This is either 'json' or 'perl'. If you indicate 'json' then you'll get the
raw JSON as given by the remote API. Otherwise, the JSON::from_json function
is used to transform the r
Mojar-Google-Analytics ( N/NI/NICZERO/Mojar-Google-Analytics-1.112.tar.gz, NICZERO, 2017; MetaCPAN )
Mojar-Google-Analytics/lib/Mojar/Google/Analytics.pm ( view source; MetaCPAN )
>grant_type,
    assertion => $jwt->encode
  })->res;
  if ($res->is_success) {
    my $j = $res->json;
    return undef unless ref $j eq 'HASH' and $j->{expires_in};
    return $j->{access_token};
  
MojoMojo ( M/MR/MRAMBERG/MojoMojo-1.12.tar.gz, MRAMBERG, 2017; MetaCPAN )
MojoMojo/lib/MojoMojo/Schema/Result/Attachment.pm ( view source; MetaCPAN )
me_type_to_description = (
    'application/javascript' => 'Javascript',
    'application/json'       => 'JSON data',
    'application/pdf'        => 'PDF document',
    'application/xhtml+xml'  => 'W
Net-Async-TravisCI ( T/TE/TEAM/Net-Async-TravisCI-0.002.tar.gz, TEAM, 2017; MetaCPAN )
Net-Async-TravisCI/lib/Net/Async/TravisCI.pm ( view source; MetaCPAN )
t yet documented.

=cut

no indirect;

use Future;
use Dir::Self;
use URI;
use URI::Template;
use JSON::MaybeXS;
use Syntax::Keyword::Try;

use File::ShareDir ();
use Log::Any qw($log);
use Path::Tiny
:Async::TravisCI::Config;
use Net::Async::TravisCI::Job;
use Net::Async::TravisCI::Build;

my $json = JSON::MaybeXS->new;

=head2 configure

Applies configuration, which at the moment would involve ze
<share/endpoints.json> file.

=cut

sub endpoints {
	my ($self) = @_;
	$self->{endpoints} ||= do {
        my $path = Path::Tiny::path(__DIR__)->parent(3)->child('share/endpoints.json');
        $path
CloudCron ( J/JL/JLMARTIN/CloudCron-0.02.tar.gz, JLMARTIN, 2017; MetaCPAN )
CloudCron/lib/CloudCron/Compiler.pm ( view source; MetaCPAN )
             Arn   => $self->target->Arn,
                Id    => $self->target->Id,
                Input => $input->json,
            },
        ],
    });
}

__PACKAGE__->meta->make_immutable;
1;

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