ShadertoyWSClient class

A Shadertoy REST API client

Provides an implementation of the ShadertoyWS thus allowing the creation of a client to access all the methods provided by the shadertoy REST API as described in the Shadertoy howto

Implemented types

Constructors

ShadertoyWSClient(ShadertoyWSOptions options, {Dio? client})
Creates a ShadertoyWSClient

Properties

client → Dio
Provides the Dio client instance build as part of this Shadertoy client instance
no setterinherited
context → ShadertoyContext
The ShadertoyContext object stores Shadertoy website contextual information
finalinherited
cookies Future<List<Cookie>>
Provides the list of Cookie received
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
options ShadertoyWSOptions
A object inheriting from ShadertoyHttpOptions
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

catchDioError<R extends APIResponse>(Future<R> future, R handle(DioError)) Future<R>
Catches and handles a DioError error in a future
inherited
clearCookies() → void
Clears the cookies
inherited
findAllShaderIds() Future<FindShaderIdsResponse>
Returns a FindShaderIdsResponse with all the shader id's
findShaderById(String shaderId) Future<FindShaderResponse>
Returns a FindShaderResponse for the shader with shaderId
findShaderIds({String? term, Set<String>? filters, Sort? sort, int? from, int? num}) Future<FindShaderIdsResponse>
Returns a filtered FindShaderIdsResponse with a list of shader ids.
findShaders({String? term, Set<String>? filters, Sort? sort, int? from, int? num}) Future<FindShadersResponse>
Returns a filtered FindShadersResponse with a list of shaders
findShadersByIdSet(Set<String> shaderIds) Future<FindShadersResponse>
Returns a FindShadersResponse for each shader id in shaderIds
getShadersQuery({String? term, Set<String>? filters, Sort? sort, int? from, int? num}) String
Returns the query used to search for shaders
isDioError(Object error) bool
Helper function to test if an object is a DioError
inherited
jsonResponse<R extends APIResponse>(Response response, R handler(dynamic data), {String? context, String? target}) → R
Reads the response and returns the appropiate object.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pooled<R>(Pool pool, FutureOr<R> fn()) Future<R>
Makes a call using a Pool
inherited
pooledRetry<R>(Pool pool, FutureOr<R> fn(), {RetryOptions? retryOptions}) Future<R>
Makes a call using a Pool whith retry semantics in case of error
inherited
toResponseError(DioError de, {String? context, String? target}) → ResponseError
Converts a DioError to a ResponseError
inherited
toString() String
A string representation of this object.
inherited

Operators

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