Group
Extension

Matches 35358

Imgur-API ( M/ML/MLHOLLEN/Imgur-API-0.1.3.tar.gz, MLHOLLEN, 2017; MetaCPAN )
Imgur-API/lib/Imgur/API.pm ( view source; MetaCPAN )
mgur::API::Stats;
use Data::Dumper;
use LWP::UserAgent;
use HTTP::Message;
use HTTP::Request;
use JSON::XS;
use URI::Escape;

use Moo;

has client_secret=>(is=>'ro');
has client_id=>(is=>'ro',required
PI::Stats->new();});

sub request {
	my ($this,$path,$method,$params) = @_;

	$params->{_format}="json";

	$this->ua->agent("Imgur::API/0.0,1");

	my $auth;
	if ($this->access_token) {
		$auth="Bearer
cation/json") {
		$this->stats->update($response);
		my $json = JSON::XS::decode_json($response->decoded_content);
		if  (!$json->{success}) {
			my $e =  Imgur::API::Exception->new(code=>$json->{stat
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
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 
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-Graylog-Client ( J/JA/JALAVOY/Net-Graylog-Client-0.7.tar.gz, JALAVOY, 2017; MetaCPAN )
Net-Graylog-Client/lib/Net/Graylog/API.pm ( view source; MetaCPAN )
Graylog::API;
{
  $Net::Graylog::API::VERSION = '0.7';
}

use strict;
use warnings;
use Furl;
use JSON;
use Moo;
use URI::Escape::XS qw/uri_escape/;
use Data::Printer;
use namespace::clean;

# -------
           headers => [
                'Accept'       => 'application/json',
                'content-type' => 'application/json',
            ],
            timeout => $self->timeout,
        );
   
"url [$method] $url" if ( $ENV{DEBUG} );
    my $headers;    #= [ 'Content-type' => ['application/json'] ] ;
    my $res = $self->_furl->request(
        method  => uc($method),
        url     => $ur
Imgur-API ( M/ML/MLHOLLEN/Imgur-API-0.1.3.tar.gz, MLHOLLEN, 2017; MetaCPAN )
Imgur-API/scripts/generate_classes.pl ( view source; MetaCPAN )
#!/usr/bin/env perl

use JSON::XS;
use Template;
use Data::Dumper;
use feature qw(say);

open(FI,"data/endpoints.json");
my $data = JSON::XS::decode_json(join("",<FI>));
my $tt = Template->new();
fore
Imgur-API ( M/ML/MLHOLLEN/Imgur-API-0.1.3.tar.gz, MLHOLLEN, 2017; MetaCPAN )
Imgur-API/scripts/generate_pod.pl ( view source; MetaCPAN )
#!/usr/bin/env perl

use JSON::XS;
use Template;
use Data::Dumper;
use feature qw(say);

open(FI,"data/endpoints.json");
my $data = JSON::XS::decode_json(join("",<FI>));
my $tt = Template->new();
fore
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
CloudCron ( J/JL/JLMARTIN/CloudCron-0.02.tar.gz, JLMARTIN, 2017; MetaCPAN )
CloudCron/lib/CloudCron/TargetInput.pm ( view source; MetaCPAN )
package CloudCron::TargetInput;
use Moose;
use JSON;

has command => (is => 'ro', isa => 'Str', required => 1);
has env     => (is => 'ro', isa => 'HashRef[Str]', required => 0, default => sub { {} })
 (is => 'ro', isa => 'Str', required => 0, default => sub { 'shell' });

sub json {
    my $self = shift;
    return to_json({
        command => $self->command,
        env     => $self->env,
       
WWW-Zotero ( H/HO/HOCHSTEN/WWW-Zotero-0.04.tar.gz, HOCHSTEN, 2017; MetaCPAN )
WWW-Zotero/lib/WWW/Zotero.pm ( view source; MetaCPAN )
onKey => 'QM6T3KHX');
    my $data = $client->listSearches(user => '475425');

=cut

use Moo;
use JSON;
use URI::Escape;
use REST::Client;
use Data::Dumper;
use POSIX qw(strftime);
use Carp;
use Log::
ponse = $self->_zotero_get_request('/itemTypes');

    return undef unless $response;

    decode_json $response->responseContent;
}

=head2 itemTypes()

Get all item fields. Returns a Perl array.

=c
onse = $self->_zotero_get_request('/itemFields');

    return undef unless $response;

    decode_json $response->responseContent;
}

=head2 itemTypes($type)

Get all valid fields for an item type. Re
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
Dist-Zooky ( B/BI/BINGOS/Dist-Zooky-0.24.tar.gz, BINGOS, 2017; MetaCPAN )
Dist-Zooky/lib/Dist/Zooky/Core/ModBuild.pm ( view source; MetaCPAN )
 ];
    run ( command => $cmd, verbose => 0 );
  }

  if ( -e 'MYMETA.json' ) {

    $struct = $self->meta_from_file( 'MYMETA.json' );

  }
  elsif ( -e 'MYMETA.yml' ) {

    $struct = $self->meta_fro
m_file( 'MYMETA.yml' );

  }
  else {

    die "Couldn\'t find a 'MYMETA.yml or MYMETA.json' file, giving up\n";

  }

  {
    my $cmd = [ $^X, 'Build', 'distclean' ];
    run( command => $cmd, verbos
CloudCron ( J/JL/JLMARTIN/CloudCron-0.02.tar.gz, JLMARTIN, 2017; MetaCPAN )
CloudCron/lib/CloudCronCLI/Remove.pm ( view source; MetaCPAN )
package CloudCronCLI::Remove;
  use MooseX::App::Command;

  use Paws;
  use JSON;
  use CloudDeploy::Utils;
  use CloudCron::AWS::CloudWatch;

  command_short_description q(Delete a crontab queue or 
Dist-Zooky ( B/BI/BINGOS/Dist-Zooky-0.24.tar.gz, BINGOS, 2017; MetaCPAN )
Dist-Zooky/lib/Dist/Zooky/Core/FromMETA.pm ( view source; MetaCPAN )
TA.json' ) {

    $struct = $self->meta_from_file( 'META.json' );

  }
  elsif ( -e 'META.yml' ) {

    $struct = $self->meta_from_file( 'META.yml' );

  }
  else {

    die "There is no 'META.json' n
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
Dist-Zooky ( B/BI/BINGOS/Dist-Zooky-0.24.tar.gz, BINGOS, 2017; MetaCPAN )
Dist-Zooky/lib/Dist/Zooky/Core/MakeMaker.pm ( view source; MetaCPAN )
 ];
    run ( command => $cmd, verbose => 0 );
  }

  if ( -e 'MYMETA.json' ) {

    $struct = $self->meta_from_file( 'MYMETA.json' );

  }
  elsif ( -e 'MYMETA.yml' ) {

    $struct = $self->meta_fro
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
Imgur-API ( M/ML/MLHOLLEN/Imgur-API-0.1.3.tar.gz, MLHOLLEN, 2017; MetaCPAN )
Imgur-API/scripts/scrape_models.pl ( view source; MetaCPAN )
se Data::Dumper;
use JSON::XS;
use HTML::TreeBuilder::LibXML;
use LWP::UserAgent;
use HTTP::Message;
use Template;
use Try::Tiny;

my $template = Template->new();

my $json = JSON::XS->new->pretty;

m
ok_down(_tag=>'div',class=>'textbox');

	my ($example) = ($content->look_down(_tag=>"div",class=>"json"));
	if ($example) {
		my $ext = $example->as_text;
		$ext=~s/\n//g;
		$ext=~s/\s{2,}//g;
		$ext=
t=~s/[^'|"](\w+):[^\/]/"$1":/g;
		$ext=~s/""/","/g;

		
			
		try {	
			$res->{example} = $json->encode($json->decode($ext));
		} catch {		
			$res->{example} = $example->as_text;
		};
	}

	$res->{des
Mojo-CloudCheckr ( S/SA/SADAMS/Mojo-CloudCheckr-0.01.tar.gz, SADAMS, 2017; MetaCPAN )
Mojo-CloudCheckr/lib/Mojo/CloudCheckr.pm ( view source; MetaCPAN )
e 'missing access_key' };
has base_url   => 'https://api.cloudcheckr.com/api';
has format     => 'json';
has _ua        => sub { Mojo::UserAgent->new };

sub get {
  my ($self, $cb) = (shift, ref $_[-
ojo::CloudCheckr->new(access_key => '...');
  say $cc->get(account => 'get_accounts_v2')->result->json('/accounts_and_users/0/account_name');
  
=head1 DESCRIPTION

A simple interface to the CloudChec
;
  $cc        = $cc->format($format);

The response format from the CloudCheckr API, defaults to json.

  # Set the format to XML
  $cc->format('xml');

=head1 METHODS

L<Mojo::CloudCheckr> inherits 
Imgur-API ( M/ML/MLHOLLEN/Imgur-API-0.1.3.tar.gz, MLHOLLEN, 2017; MetaCPAN )
Imgur-API/scripts/generate_model_pod.pl ( view source; MetaCPAN )
#!/usr/bin/env perl

use JSON::XS;
use Template;
use Data::Dumper;
use feature qw(say);

open(FI,"data/models.json");
my $data = JSON::XS::decode_json(join("",<FI>));
my $tt = Template->new();
foreach

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