socketry / cloudflare

An asynchronous Ruby wrapper for the CloudFlare V4 API.
MIT License
138 stars 86 forks source link

zone_list doesn't work #13

Closed davidhq closed 8 years ago

davidhq commented 9 years ago
/Users/david/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cloudflare-2.0.3/lib/cloudflare/connection.rb:549:in `send_req': Invalid act. (CloudFlare::RequestError)
    from /Users/david/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/cloudflare-2.0.3/lib/cloudflare/connection.rb:516:in `zone_list'
    from ./cf.rb:6:in `<main>'

Minimal sample:

cf = CloudFlare::connection('xxxxxx', 'user@gmail.com')

p cf.zone_list
morganchristiansson commented 8 years ago

Getting the same thing +1

pencoyd commented 8 years ago

Unclear if the author is maintaining, but I'd suggest moving to the current API (v4) at https://api.cloudflare.com regardless

infinite-monkeys commented 8 years ago

The zone_list is part of the cloudflare "host" API.

Each of the method calls has a pointer to the docs. In this case, https://www.cloudflare.com/docs/host-api.html#s3.2.10

Take a look at https://github.com/b4k3r/cloudflare/blob/master/lib/cloudflare/connection.rb#L528. If you initialize your CloudFlare::connection with an email, it will use the client API.

#zone_load_multi may give you the equivalent information that as what you're looking for.

HTH.