API-Mathpix
view release on metacpan or search on metacpan
lib/API/Mathpix.pm view on Meta::CPAN
package API::Mathpix;
use Moose;
use JSON::PP;
use LWP::UserAgent;
use HTTP::Request;
use MIME::Base64;
use Algorithm::LeakyBucket;
use API::Mathpix::Response;
has 'app_id' => (
is => 'rw',
isa => 'Str'
);
has 'app_key' => (
is => 'rw',
isa => 'Str'
);
has '_ua' => (
is => 'rw',
isa => 'LWP::UserAgent'
);
has '_bucket' => (
is => 'rw',
isa => 'Algorithm::LeakyBucket'
);
=head1 NAME
API::Mathpix - Use the API of Mathpix
=head1 VERSION
Version 0.01
=cut
our $VERSION = '0.01';
=head1 SYNOPSIS
my $mathpix = API::Mathpix->new({
app_id => $ENV{MATHPIX_APP_ID},
app_key => $ENV{MATHPIX_APP_KEY},
});
my $response = $mathpix->process({
src => 'https://mathpix.com/examples/limit.jpg',
});
print $response->text;
=head1 EXPORT
A list of functions that can be exported. You can delete this section
if you don't export anything, such as for a purely object-oriented module.
=head1 SUBROUTINES/METHODS
( run in 1.081 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )