Cloudflare class

Constructors

Cloudflare({String? apiUrl, required String accountId, String? token, TokenCallback? tokenCallback, String? apiKey, String? accountEmail, String? userServiceKey, @Deprecated('Use connectTimeout instead') Duration? timeout, Duration? connectTimeout, Duration? receiveTimeout, Duration? sendTimeout, HttpClient? httpClient})
Cloudflare brings you full access to different apis like ImageAPI and StreamAPI.
Cloudflare.basic({String? apiUrl, Duration? connectTimeout, Duration? receiveTimeout, Duration? sendTimeout, HttpClient? httpClient})
Use this constructor when you don't need to make authorized requests to Cloudflare apis, like when you just need to do image or stream direct upload to an uploadURL
factory

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
connectTimeout Duration?
Timeout for requests.
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
APIs
latefinal
isInitialized bool
no setter
liveInputAPI ↔ LiveInputAPI
latefinal
receiveTimeout Duration?
Timeout for receiving data.
final
restAPI → RestAPI
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sendTimeout Duration?
Timeout for sending data, like when using stream upload or Tus protocol.
final
streamAPI StreamAPI
latefinal
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