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
withhandler
for the requestmethod
. -
any(
String name, APIRouteFunction function, {Map< String, TypeInfo> ? parameters, Iterable<APIRouteRule> ? rules}) → APIModule -
Adds a route of
name
withhandler
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
withhandler
forDELETE
request method. -
deleteFrom(
Object? provider) → void -
Adds routes from
provider
forDELETE
request method. -
from(
APIRequestMethod? requestMethod, Object? provider) → bool -
Adds routes from
provider
for the requestrequestMethod
. -
get(
String name, APIRouteFunction function, {Map< String, TypeInfo> ? parameters, Iterable<APIRouteRule> ? rules}) → APIModule -
Adds a route of
name
withhandler
forGET
request method. -
getFrom(
Object? provider) → void -
Adds routes from
provider
forGET
request method. -
head(
String name, APIRouteFunction function, {Map< String, TypeInfo> ? parameters, Iterable<APIRouteRule> ? rules}) → APIModule -
Adds a route of
name
withhandler
forHEAD
request method. -
headFrom(
Object? provider) → void -
Adds routes from
provider
forHEAD
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
withhandler
forPATCH
request method. -
patchFrom(
Object? provider) → void -
Adds routes from
provider
forPATCH
request method. -
post(
String name, APIRouteFunction function, {Map< String, TypeInfo> ? parameters, Iterable<APIRouteRule> ? rules}) → APIModule -
Adds a route of
name
withhandler
forPOST
request method. -
postFrom(
Object? provider) → void -
Adds routes from
provider
forPOS
request method. -
put(
String name, APIRouteFunction function, {Map< String, TypeInfo> ? parameters, Iterable<APIRouteRule> ? rules}) → APIModule -
Adds a route of
name
withhandler
forPUT
request method. -
putFrom(
Object? provider) → void -
Adds routes from
provider
forPUT
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?