APIRouteBuilder<M extends APIModule> class

A route builder.

Constructors

APIRouteBuilder(M module)

Properties

hashCode int
The hash code for this object.
no setterinherited
module → M
The API module of this route builder.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(APIRequestMethod? method, String name, APIRouteFunction function, {Map<String, TypeInfo>? parameters, Iterable<APIRouteRule>? rules, APIRouteConfig? config}) APIModule
Adds a route of name with handler for the request method.
any(String name, APIRouteFunction function, {Map<String, TypeInfo>? parameters, Iterable<APIRouteRule>? rules}) APIModule
Adds a route of name with handler for ANY request method.
anyFrom(Object? provider) → void
Adds routes from provider for ANY request method.
apiInfo([APIRequest? apiRequest]) List<APIRouteInfo>
apiMethod(MethodReflection apiMethod, [APIRequestMethod? requestMethod]) bool
Adds a route from apiMethod, using the same name of the methods as route. See MethodReflectionExtension.isAPIMethod.
apiMethods(Iterable<MethodReflection> apiMethods, [APIRequestMethod? requestMethod]) bool
Adds the routes from apiMethods. See apiMethod.
apiReflection(ClassReflection reflection, [APIRequestMethod? requestMethod]) bool
Adds routes from a reflection, one for each API method in the reflected class. See ClassReflectionExtension.apiMethods.
delete(String name, APIRouteFunction function, {Map<String, TypeInfo>? parameters, Iterable<APIRouteRule>? rules}) APIModule
Adds a route of name with handler for DELETE request method.
deleteFrom(Object? provider) → void
Adds routes from provider for DELETE request method.
from(APIRequestMethod? requestMethod, Object? provider) bool
Adds routes from provider for the request requestMethod.
get(String name, APIRouteFunction function, {Map<String, TypeInfo>? parameters, Iterable<APIRouteRule>? rules}) APIModule
Adds a route of name with handler for GET request method.
getFrom(Object? provider) → void
Adds routes from provider for GET request method.
Adds a route of name with handler for HEAD request method.
headFrom(Object? provider) → void
Adds routes from provider for HEAD request method.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
patch(String name, APIRouteFunction function, {Map<String, TypeInfo>? parameters, Iterable<APIRouteRule>? rules}) APIModule
Adds a route of name with handler for PATCH request method.
patchFrom(Object? provider) → void
Adds routes from provider for PATCH request method.
post(String name, APIRouteFunction function, {Map<String, TypeInfo>? parameters, Iterable<APIRouteRule>? rules}) APIModule
Adds a route of name with handler for POST request method.
postFrom(Object? provider) → void
Adds routes from provider for POS request method.
put(String name, APIRouteFunction function, {Map<String, TypeInfo>? parameters, Iterable<APIRouteRule>? rules}) APIModule
Adds a route of name with handler for PUT request method.
putFrom(Object? provider) → void
Adds routes from provider for PUT request method.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

resolveValueByType(TypeInfo typeInfo, Object? value, {EntityCache? entityCache, EntityResolutionRules? resolutionRules}) Object?