newShadertoyWSClient function
Creates ShadertoyWS backed by the Shadertoy Rest API
apiKey
: The API keyapiPath
: The base api pathbaseUrl
: The Shadertoy base urlpoolMaxAllocatedResources
: The maximum number of resources allocated for parallel callspoolTimeout
: The timeout before giving up on a callretryMaxAttempts
: The maximum number of attempts at a failed requestshaderCount
: The number of shaders fetched in a paged callerrorHandling
: The error handling modeclient
: A pre-initializedDio
client
Implementation
ShadertoyWS newShadertoyWSClient(String apiKey,
{String? apiPath,
String? baseUrl,
int? poolMaxAllocatedResources,
int? poolTimeout,
int? retryMaxAttempts,
int? shaderCount,
ErrorMode? errorHandling,
Dio? client}) {
return ShadertoyWSClient(
ShadertoyWSOptions(
apiKey: apiKey,
apiPath: apiPath,
baseUrl: baseUrl,
poolMaxAllocatedResources: poolMaxAllocatedResources,
poolTimeout: poolTimeout,
retryMaxAttempts: retryMaxAttempts,
shaderCount: shaderCount,
errorHandling: errorHandling),
client: client);
}