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
}
);
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
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
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 => [{
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
}
);
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 => [{
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__
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__