pwr22 / cloudflare-client

CloudFlare::Client Perl module
https://metacpan.org/pod/CloudFlare::Client
2 stars 0 forks source link

Invalid Input - missing 'act' param #3

Closed pavelsr closed 7 years ago

pavelsr commented 7 years ago

Seems like your currect code that on MetaCPAN doesn't work.

When I trying to output list of zones that is available for managing under my account

use Data::Dumper;
use CloudFlare::Client;

my $api = CloudFlare::Client->new(
    user   => 'myaccount@gmail.com',  
    apikey => '11111111111111111111111111'   # of course in real script I substitute user and apikey to real
);

my $z = $api->zones;
warn Dumper $z;

i got:

Invalid Input - missing 'act'  param

Trace begun at /usr/local/share/perl/5.18.2/CloudFlare/Client.pm line 65
CloudFlare::Client::_apiCall('CloudFlare::Client=HASH(0x9b1dc0c)', 'zones') called at /usr/local/share/perl/5.18.2/CloudFlare/Client.pm line 77
CloudFlare::Client::AUTOLOAD('CloudFlare::Client=HASH(0x9b1dc0c)') called at clf.pl line 28
pwr22 commented 7 years ago

I don't expect the current version of the module to work anymore since the API it uses has been removed by CloudFlare. You may be able to get what you need using Mojo::Cloudflare

I was planning to update the module at some point

pwr22 commented 7 years ago

If Mojo::CloudFlare doesn't cover the use case you need, let me know and I'll get the next release out ASAP

pavelsr commented 7 years ago

I used MojoX::CloudFlare::Simple as Cloudflare API client and it covered my use case Just wanted to attract your attention on non-working code at CPAN

pwr22 commented 7 years ago

That't great, I'll close this off then