MojoX::CloudFlare::Simple - simple cloudflare client without wrapper
use MojoX::CloudFlare::Simple; my $cloudflare = MojoX::CloudFlare::Simple->new( email => 'blabla@blabla.com', key => 'secretkeyblabla', ); my $zones = $cloudflare->request('GET', 'zones'); say Dumper(\$zones); my $result = $cloudflare->request('DELETE', "zones/$zone_id/purge_cache", { files => [ 'http://bsportsfan.com/', 'https://assets.bsportsfan.com/images/team/s/34953.png' ] }); say Dumper(\$result);
MojoX::CloudFlare::Simple is a simple client for cloudflare. it does not have any wrap or trick. it just simply send the requests and return your data. you need handle everything yourself.
You can get your key from https://www.cloudflare.com/a/account/my-account
you can find some examples scripts like get zones, purge files under examples.
please use ENV MOJO_USERAGENT_DEBUG for debug.
Fayland Lam <fayland@gmail.com>
Copyright 2016- Fayland Lam
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install MojoX::CloudFlare::Simple, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MojoX::CloudFlare::Simple
CPAN shell
perl -MCPAN -e shell install MojoX::CloudFlare::Simple
For more information on module installation, please visit the detailed CPAN module installation guide.