NAME

CloudFlare::Client - Object Orientated Interface to CloudFlare client API

VERSION

version 0.05_2

SYNOPSIS

use CloudFlare::Client;

my $api = CloudFlare::Client::->new(
    user   => $CF_USER,
    apikey => $CF_KEY);
$api->stats;
...

OVERVIEW

Please see the documentation at https://www.cloudflare.com/docs/client-api.html for information on 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

METHODS

new

Construct a new API object

my $api = CloudFlare::Client::->new(
    user   => $CF_USER,
    apikey => $CF_KEY)

stats

$api->stats($zone, $interval)

zoneLoadMulti

$api->zoneLoadMulti

recLoadAll

$api->recLoadAll($zone);

zoneCheck

$api->zoneCheck(@zones);

zoneIps

$api->zoneIps($zone, %optionalArgs);

ipLkup

$api->ipLkup($ip)

zoneSettings

$api->zoneSettings($zone)

secLvl

$api->secLvl($zone, $securityLvl)

cacheLvl

$api->cacheLvl($zone, $cacheLevel)

devMode

$api->devMode($zone, $value)

fpurgeTs

$api->fpurgeTs($zone, $value)

zoneFilePurge

$api->zoneFilePurge($zone, $url)

zoneGrab

$api->zoneGrab($zoneId)

wl

$api->wl($ip)

ban

$api->ban($ip)

nul

$api->nul($ip)

ipv46

$api->ipv46($zone, $value)

async

$api->async($zone, $value)

minify

$api->minify($zone, $value)

mirage2

$api->mirage2($zone, $value)

recNew

$api->recNew($zone, $type, $name
             $content, $ttl, %optionalArgs)

recEdit

$api->recEdit($zone, $type, $recordId, $name
              $content, $ttl, %optionalArgs)

recDelete

$api->recDelete($zone, $recordId)

SEE ALSO

Please see those modules/websites for more information related to this module.

SUPPORT

Perldoc

You can find documentation for this module with the perldoc command.

perldoc CloudFlare::Client

Websites

The following websites have more information about this module, and may be of help to you. As always, in addition to those websites please use your favorite search engine to discover more resources.

Email

You can email the author of this module at me+dev@peter-r.co.uk asking for help with any problems you have.

Source Code

The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :)

https://github.com/pwr22/cloudflare-client

git clone git://github.com/pwr22/cloudflare-client.git

BUGS

Please report any bugs or feature requests on the bugtracker website https://github.com/pwr22/cloudflare-client/issues

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

ACKNOWLEDGEMENTS

Thanks to CloudFlare providing an awesome free service with an API.

AUTHOR

Peter Roberts <me+dev@peter-r.co.uk>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2015 by Peter Roberts.

This is free software, licensed under:

The MIT (X11) License