class Cloudflare::Connection
Constants
- ENDPOINT
Public Instance Methods
accounts()
click to toggle source
# File lib/cloudflare/connection.rb, line 44 def accounts Accounts.new(self.with(path: "accounts")) end
authenticated(token: nil, key: nil, email: nil)
click to toggle source
# File lib/cloudflare/connection.rb, line 23 def authenticated(token: nil, key: nil, email: nil) headers = {} if token headers["authorization"] = "bearer #{token}" elsif key if email headers["x-auth-key"] = key headers["x-auth-email"] = email else headers["x-auth-user-service-key"] = key end end self.with(headers: headers) end
user()
click to toggle source
# File lib/cloudflare/connection.rb, line 48 def user User.new(self.with(path: "user")) end
zones()
click to toggle source
# File lib/cloudflare/connection.rb, line 40 def zones Zones.new(self.with(path: "zones/")) end