Cloudflare class

Constructors

Cloudflare({String? apiUrl, required String accountId, String? token, TokenCallback? tokenCallback, String? apiKey, String? accountEmail, String? userServiceKey, Duration? timeout, HttpClient? httpClient})

Properties

accountEmail String?
To be used as X-Auth-Email. Email address associated with your account
final
accountId String
Cloudflare account id
final
apiKey String?
Check https://api.cloudflare.com/#getting-started-requests to know how to authenticate requests To use legacy authentication there is two ways: Including X-Auth-Key and X-Auth-Email. Requests that usecan use that instead of the Auth-Key and Auth-Email headers. To be used as X-Auth-Key header. API key generated on the "My Account" page
final
apiUrl String
Cloudflare api url, at the moment of writing this: https://api.cloudflare.com/client/v4
final
hashCode int
The hash code for this object.
no setterinherited
httpClient HttpClient?
Set this if you need control over http requests like validating certificates and so. Not supported in Web
final
imageAPI ImageAPI
Image API
latefinal
isInitialized bool
no setter
restAPI → RestAPI
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timeout Duration?
API requests duration timeout
final
token String?
Cloudflare API token. API Tokens provide a new way to authenticate with the Cloudflare API. They allow for scoped and permissioned access to resources and use the RFC compliant Authorization Bearer Token Header.
final
tokenCallback TokenCallback
Callback to asynchronously get Cloudflare API token
final
userServiceKey String?
To be used as X-Auth-User-Service-Key. A special Cloudflare API key good for a restricted set of endpoints. Always begins with "v1.0-", may vary in length.
final

Methods

init() Future<void>
Call this function before using Cloudflare APIs
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited