CloudFlare::Client - Object Orientated Interface to CloudFlare client API
version 0.03_7
Provides an object orientated interface to the CloudFlare client API
use CloudFlare::Client; my $api = CloudFlare::Client::->new( user => $CF_USER, apikey => $CF_KEY); $api->stats; ...
Please see the documentation at https://www.cloudflare.com/docs/client-api.html for information the CloudFlare client API and its arguments. Optional arguments are passed in as a hash with keys as given in the docs
Successful API calls return the response section from the upstream JSON API. Failures for whatever reason throw exceptions under the CloudFlare::Client::Exception:: namespace
CF user name (email) used to access the API. Set using the user argument to the constructor. Readonly.
CF API key, set using the apikey argument to the constructor. Readonly
UserAgent object used to make API calls, set internally. Readonly
Construct a new CloudFlare::Client API object
my $api = CloudFlare::Client::->new( user => $CF_USER, apikey => $CF_KEY)
$api->stats($zone, $interval)
$api->zoneLoadMulti
$api->recLoadAll($zone);
$api->zoneCheck(@zones);
$api->zoneIps($zone, %optionalArgs);
$api->ipLkup($ip)
$api->zoneSettings($zone)
$api->secLvl($zone, $securityLvl)
$api->cacheLvl($zone, $cacheLevel)
$api->devMode($zone, $value)
$api->fpurgeTs($zone, $value)
$api->zoneFilePurge($zone, $url)
$api->zoneGrab($zoneId)
$api->wl($ip)
$api->ban($ip)
$api->nul($ip)
$api->ipv46($zone, $value)
$api->async($zone, $value)
$api->minify($zone, $value)
$api->mirage2($zone, $value)
$api->recNew($zone, $type, $name $content, $ttl, %optionalArgs)
$api->recEdit($zone, $type, $recordId, $name $content, $ttl, %optionalArgs)
$api->recDelete($zone, $recordId)
Makes a call through to the CF API, via HTTPS POST
$api->_makeCall($action, %args)
If the HTTPS connection fails this can throw a CloudFlare::Client::Exception::Connection. If the CF API itself gives an error then it can throw a CloudFlare::Client::Exception::Upstream
Used to aggregrate a number of CF calls with a single signature into one function
Please report any bugs or feature requests to bug-cloudflare-client at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CloudFlare-Client. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-cloudflare-client at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc CloudFlare::Client
You can also look for information at:
DDFlare
https://bitbucket.org/pwr22/ddflare
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=CloudFlare-Client
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/CloudFlare-Client
CPAN Ratings
http://cpanratings.perl.org/d/CloudFlare-Client
Search CPAN
http://search.cpan.org/dist/CloudFlare-Client/
Thanks to CloudFlare providing an awesome free service with an API.
Peter Roberts <me+dev@peter-r.co.uk>
This software is Copyright (c) 2014 by Peter Roberts.
This is free software, licensed under:
The MIT (X11) License
To install CloudFlare::Client, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CloudFlare::Client
CPAN shell
perl -MCPAN -e shell install CloudFlare::Client
For more information on module installation, please visit the detailed CPAN module installation guide.