Group
Extension

Matches 35358

Perlgram ( A/AM/AMIRCANDY/Perlgram-0.03.tar.gz, AMIRCANDY, 2025; MetaCPAN )
Perlgram/blib/lib/Perlgram/Update.pm ( view source; MetaCPAN )
package Perlgram::Update;
use strict;
use warnings;
use Carp qw(croak);
use JSON qw(encode_json);
use Perlgram::Types;

sub new {
    my ($class, %args) = @_;
    my $self = {
        bot   
self->{bot}->answerInlineQuery(
        inline_query_id => $query_id,
        results => encode_json($results),
    );
}

sub _handle_chosen_inline_result {
    my ($self, $result) = @_;
}

;
    $self->{bot}->answerShippingQuery(
        shipping_query_id => $query_id,
        ok => JSON::true,
        shipping_options => [
            { id => '1', title => 'Standard', prices => [{
Whelk ( B/BR/BRTASTIC/Whelk-1.04.tar.gz, BRTASTIC, 2025; MetaCPAN )
Whelk/lib/Whelk/Manual/Kelp.pod ( view source; MetaCPAN )
w(JSON YAML Whelk)],
		modules_init => {
			Routes => {
				base => 'MyApp/Controller',
				rebless => 1,
			},
			Whelk => {
				resources => {
					Res => '/',
				},
				openapi => '/openapi.json',
Whelk ( B/BR/BRTASTIC/Whelk-1.04.tar.gz, BRTASTIC, 2025; MetaCPAN )
Whelk/lib/Whelk/Config.pm ( view source; MetaCPAN )
::data,
		{
			modules => [qw(JSON YAML Whelk)],
			modules_init => {
				Routes => {
					base => 'Whelk::Resource',
					rebless => 1,
					fatal => 1,
				},

				JSON => {
					utf8 => 0,    # wil
YAML => {
					kelp_extensions => 1,
					boolean => 'perl,JSON::PP',
				},
			},

			persistent_controllers => 1,

			encoders => {
				json => {
					openapi => {
						pretty => 1,
						canonical
Whelk ( B/BR/BRTASTIC/Whelk-1.04.tar.gz, BRTASTIC, 2025; MetaCPAN )
Whelk/lib/Whelk/Wrapper.pm ( view source; MetaCPAN )
es and error handling. Wrappers do not handle
encoding requests and responses (for example with C<JSON>), that's a job for
L<Whelk::Formatter>.

In addition, wrapper decides how to treat failures. It 
Whelk ( B/BR/BRTASTIC/Whelk-1.04.tar.gz, BRTASTIC, 2025; MetaCPAN )
Whelk/lib/Whelk/Formatter.pm ( view source; MetaCPAN )
my ($self, $app) = @_;
	my $app_encoders = $app->encoder_modules;

	my %supported = (
		json => 'application/json',
		yaml => 'text/yaml',
	);

	foreach my $encoder (keys %supported) {
		delete $suppo

	my ($self, $app) = @_;
	my $format = $self->match_format($app);

	return
		$format eq 'json' ? $app->req->json_content :
		$format eq 'yaml' ? $app->req->yaml_content :
		undef;
}

sub format_respon
rmatter';

	# at the very least, this attribute must be given a default
	attr response_format => 'json';

=head1 DESCRIPTION

Whelk::Formatter is a base class for formatters. Formatter's job is to
imp
Perlgram ( A/AM/AMIRCANDY/Perlgram-0.03.tar.gz, AMIRCANDY, 2025; MetaCPAN )
Perlgram/blib/lib/Perlgram.pm ( view source; MetaCPAN )
package Perlgram;
use strict;
use warnings;
use HTTP::Tiny;
use JSON qw(encode_json decode_json);
use URI::Escape;
use Log::Log4perl qw(:easy);
use Perlgram::Error;

our $VERSION = '0.03';
o
     } 
            # For POST methods
            else {
                my $content = encode_json($params);
                #print "DEBUG: POST Content: $content\n";  # Debug POST data
        
$url,
                    {
                        headers => { 'Content-Type' => 'application/json' },
                        content => $content
                    }
                );
    
Whelk ( B/BR/BRTASTIC/Whelk-1.04.tar.gz, BRTASTIC, 2025; MetaCPAN )
Whelk/lib/Whelk/Schema.pm ( view source; MetaCPAN )
ead1 DESCRIPTION

Whelk schema is an easy validation language for defining validations similar to
JSON Schema. It's designed to be a bit more concise and crafted specifically
for Whelk needs.

Whelk s
 type. The value must not be a reference and the output will be coerced
to a string value. Unlike JSON schema, this also accepts numbers.

Extra configuration fields:

=over

=item * default

A defaul
tput value to JSON::PP::true and
JSON::PP::false objects.

Same extra configuration as in L</string>.

=head3 number

A numeric type. Will coerce the output value to a number. Unlike JSON schema,
this
Whelk ( B/BR/BRTASTIC/Whelk-1.04.tar.gz, BRTASTIC, 2025; MetaCPAN )
Whelk/lib/Whelk/Schema/Definition.pm ( view source; MetaCPAN )
se;
use Carp;
use Kelp::Util;
use Scalar::Util qw(blessed);
use Clone qw();
use Data::Dumper;
use JSON::PP;

use Whelk::Schema::ExtraRule;

# no import loop, load Whelk::Schema for child classes
requi
@{$self->rules // []}]);

	$self->_resolve;
	return $self;
}

sub _bool
{
	return pop() ? JSON::PP::true : JSON::PP::false;
}

sub _resolve { }

sub _build
{
	my ($self, $item) = @_;

	if (blessed $it
n) {
		$res->{description} = $self->description;
	}

	if ($self->nullable) {
		$res->{nullable} = JSON::PP::true;
	}

	return $res;
}

sub exhale
{
	my ($self, $value) = @_;
	...;
}

sub inhale
{
	my 
Whelk ( B/BR/BRTASTIC/Whelk-1.04.tar.gz, BRTASTIC, 2025; MetaCPAN )
Whelk/lib/Kelp/Module/Whelk.pm ( view source; MetaCPAN )
		formatter
			inhale_response
			);
	}

	$args->{wrapper} //= 'Simple';
	$args->{formatter} //= 'JSON';

	$self->inhale_response($args->{inhale_response})
		if defined $args->{inhale_response};

	$se
Perlgram ( A/AM/AMIRCANDY/Perlgram-0.03.tar.gz, AMIRCANDY, 2025; MetaCPAN )
Perlgram/blib/lib/Perlgram/Webhook.pm ( view source; MetaCPAN )
onfig->{token}) {
            return $c->render(json => { error => 'Invalid token' }, status => 403);
        }

        my $update = $c->req->json;
        if ($update) {
            my $handle
iled: $@");
                return $c->render(json => { error => 'Internal error' }, status => 500);
            }
        }

        $c->render(json => { ok => 1 });
    });
}

1;
__END__
Perlgram ( A/AM/AMIRCANDY/Perlgram-0.03.tar.gz, AMIRCANDY, 2025; MetaCPAN )
Perlgram/lib/Perlgram/Update.pm ( view source; MetaCPAN )
package Perlgram::Update;
use strict;
use warnings;
use Carp qw(croak);
use JSON qw(encode_json);
use Perlgram::Types;

sub new {
    my ($class, %args) = @_;
    my $self = {
        bot   
self->{bot}->answerInlineQuery(
        inline_query_id => $query_id,
        results => encode_json($results),
    );
}

sub _handle_chosen_inline_result {
    my ($self, $result) = @_;
}

;
    $self->{bot}->answerShippingQuery(
        shipping_query_id => $query_id,
        ok => JSON::true,
        shipping_options => [
            { id => '1', title => 'Standard', prices => [{
Convert-Pheno ( M/MR/MRUEDA/Convert-Pheno-0.28.tar.gz, MRUEDA, 2025; MetaCPAN )
Convert-Pheno/lib/Convert/Pheno/BFF.pm ( view source; MetaCPAN )
atureType' to 'type'
                excluded => (exists $_->{excluded} ? delete $_->{excluded} : JSON::PP::false),
                                                         # _notes => $_->{notes}
   
Perlgram ( A/AM/AMIRCANDY/Perlgram-0.03.tar.gz, AMIRCANDY, 2025; MetaCPAN )
Perlgram/blib/lib/Perlgram/CLI.pm ( view source; MetaCPAN )
use strict;
use warnings;
use Perlgram;
use Perlgram::Update;
use Carp qw(croak);
use JSON qw(decode_json);

sub new {
    my ($class, %args) = @_;
    my $self = {
        bot      => $args
Whelk ( B/BR/BRTASTIC/Whelk-1.04.tar.gz, BRTASTIC, 2025; MetaCPAN )
Whelk/lib/Whelk/Manual.pod ( view source; MetaCPAN )
elp you build the required hashes.

Data types are defined in Whelk's own format, very similar to JSON schema but
simpler and not as strict when it comes to validation. Reusable, named schemas
can be 
 and some utility
functions to handle formats on Kelp request and response objects. By default,
a JSON formatter is used. See L<Whelk::Formatter> for more information.

Lastly, Whelk uses I<wrappers> 
ting up the app, you can immediatelly execute C<plackup> and navigate
to C<localhost:5000/openapi.json> to get an OpenAPI document describing the
generated resource. Tools like L<Swagger Editor|https:
DateTime-Locale ( D/DR/DROLSKY/DateTime-Locale-1.45.tar.gz, DROLSKY, 2025; MetaCPAN )
DateTime-Locale/lib/DateTime/Locale/en_TZ.pod ( view source; MetaCPAN )
n the tools/ directory, and is called generate-modules.
#
# This file was generated from the CLDR JSON locale data. See the LICENSE.cldr
# file included in this distribution for license details.
#
# D
DateTime-Locale ( D/DR/DROLSKY/DateTime-Locale-1.45.tar.gz, DROLSKY, 2025; MetaCPAN )
DateTime-Locale/lib/DateTime/Locale/cic_US.pod ( view source; MetaCPAN )
n the tools/ directory, and is called generate-modules.
#
# This file was generated from the CLDR JSON locale data. See the LICENSE.cldr
# file included in this distribution for license details.
#
# D
DateTime-Locale ( D/DR/DROLSKY/DateTime-Locale-1.45.tar.gz, DROLSKY, 2025; MetaCPAN )
DateTime-Locale/lib/DateTime/Locale/ebu.pod ( view source; MetaCPAN )
n the tools/ directory, and is called generate-modules.
#
# This file was generated from the CLDR JSON locale data. See the LICENSE.cldr
# file included in this distribution for license details.
#
# D
DateTime-Locale ( D/DR/DROLSKY/DateTime-Locale-1.45.tar.gz, DROLSKY, 2025; MetaCPAN )
DateTime-Locale/lib/DateTime/Locale/pa_Arab_PK.pod ( view source; MetaCPAN )
n the tools/ directory, and is called generate-modules.
#
# This file was generated from the CLDR JSON locale data. See the LICENSE.cldr
# file included in this distribution for license details.
#
# D
DateTime-Locale ( D/DR/DROLSKY/DateTime-Locale-1.45.tar.gz, DROLSKY, 2025; MetaCPAN )
DateTime-Locale/lib/DateTime/Locale/ksf_CM.pod ( view source; MetaCPAN )
n the tools/ directory, and is called generate-modules.
#
# This file was generated from the CLDR JSON locale data. See the LICENSE.cldr
# file included in this distribution for license details.
#
# D
DateTime-Locale ( D/DR/DROLSKY/DateTime-Locale-1.45.tar.gz, DROLSKY, 2025; MetaCPAN )
DateTime-Locale/lib/DateTime/Locale/byn_ER.pod ( view source; MetaCPAN )
n the tools/ directory, and is called generate-modules.
#
# This file was generated from the CLDR JSON locale data. See the LICENSE.cldr
# file included in this distribution for license details.
#
# D

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