newShadertoyHybridClient function

ShadertoyHybrid newShadertoyHybridClient({
  1. String? user,
  2. String? password,
  3. String? cookieName,
  4. int? userShaderCount,
  5. int? playlistShaderCount,
  6. int? pageResultsShaderCount,
  7. int? pageUserShaderCount,
  8. int? pagePlaylistShaderCount,
  9. String? apiKey,
  10. String? apiPath,
  11. String? baseUrl,
  12. int? poolMaxAllocatedResources,
  13. int? poolTimeout,
  14. int? retryMaxAttempts,
  15. int? shaderCount,
  16. ErrorMode? errorHandling,
  17. Dio? client,
})

Creates ShadertoyHybrid backed by a ShadertoyHybridClient

  • user: The Shadertoy user
  • password: The Shadertoy password
  • cookieName: The Shadertoy cookie name
  • userShaderCount: The number of shaders requested for a user paged call
  • playlistShaderCount: The number of shaders requested for a playlist paged call
  • pageResultsShaderCount: The number of shaders presented in the Shadertoy results page
  • pageUserShaderCount: The number of shaders presented in the Shadertoy user page
  • pagePlaylistShaderCount: The number of shaders presented in the Shadertoy playlist page
  • baseUrl: The Shadertoy base url
  • poolMaxAllocatedResources: The maximum number of resources allocated for parallel calls
  • poolTimeout: The timeout before giving up on a call
  • retryMaxAttempts: The maximum number of attempts at a failed request
  • shaderCount: The number of shaders fetched in a paged call
  • errorHandling: The error handling mode
  • client: A pre-initialized Dio client

Implementation

ShadertoyHybrid newShadertoyHybridClient(
    {String? user,
    String? password,
    String? cookieName,
    int? userShaderCount,
    int? playlistShaderCount,
    int? pageResultsShaderCount,
    int? pageUserShaderCount,
    int? pagePlaylistShaderCount,
    String? apiKey,
    String? apiPath,
    String? baseUrl,
    int? poolMaxAllocatedResources,
    int? poolTimeout,
    int? retryMaxAttempts,
    int? shaderCount,
    ErrorMode? errorHandling,
    Dio? client}) {
  return ShadertoyHybridClient(
      ShadertoySiteOptions(
          user: user,
          password: password,
          cookieName: cookieName,
          userShaderCount: userShaderCount,
          playlistShaderCount: playlistShaderCount,
          pageResultsShaderCount: pageResultsShaderCount,
          pageUserShaderCount: pageUserShaderCount,
          pagePlaylistShaderCount: pagePlaylistShaderCount,
          baseUrl: baseUrl,
          poolMaxAlocatedResources: poolMaxAllocatedResources,
          poolTimeout: poolTimeout,
          retryMaxAttempts: retryMaxAttempts,
          errorHandling: errorHandling),
      wsOptions: apiKey != null
          ? ShadertoyWSOptions(
              apiKey: apiKey,
              apiPath: apiPath,
              baseUrl: baseUrl,
              poolMaxAllocatedResources: poolMaxAllocatedResources,
              poolTimeout: poolTimeout,
              retryMaxAttempts: retryMaxAttempts,
              shaderCount: shaderCount,
              errorHandling: errorHandling)
          : null,
      client: client);
}