Package-level declarations

Types

Link copied to clipboard
interface Addressed

An object that has a Path.

Link copied to clipboard
sealed interface AnyEndpoint

A specific HTTP method in a resource.

Link copied to clipboard
abstract class DynamicResource<Parent : Resource>(val slug: String, val parent: Parent) : Resource

A resource with a wildcard segment: v1/users/{user}, v1/posts/{post}/subscribers/{user}.

Link copied to clipboard
Link copied to clipboard
abstract class Parameters(val data: ParameterStorage = HashMap())

Additional parameters for endpoints.

Link copied to clipboard
Link copied to clipboard

The path section in a URL.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed class Resource

Common parent for all resource types.

Link copied to clipboard
abstract class RootResource(val slug: String) : Resource, Addressed

The root resource of an API.

Link copied to clipboard
abstract class StaticResource<Parent : Resource>(val slug: String, val parent: Parent) : Resource

A resource with a hard-coded segment: v1/users, v1/posts/favorites.

Properties

Link copied to clipboard

Returns all endpoints that are declared on this resource or any of its children.

Link copied to clipboard

The complete URL for this endpoint, starting at its RootResource.

The complete URL of this resource, starting from the RootResource, to this resource.

Link copied to clipboard

Returns the hierarchy of this resource: following the parent chain.

Link copied to clipboard

Functions

Link copied to clipboard
fun <P : Parameters> buildParameters(construct: ParameterConstructor<P>, block: P.() -> Unit): P

Creates and configures a Parameters instance.

Link copied to clipboard
inline operator fun <T> Parameters.Parameter<T>.getValue(thisRef: Parameters, property: KProperty<*>): T

Internal method used by the parameter declaration syntax.

Link copied to clipboard

Binds a specific identifier into a DynamicResource's slug.

Link copied to clipboard
inline operator fun <T> Parameters.UnnamedParameter<T>.provideDelegate(thisRef: Parameters, property: KProperty<*>): Parameters.Parameter<T>

Internal method used by the parameter declaration syntax.

Link copied to clipboard
inline operator fun <T> Parameters.Parameter<T>.setValue(thisRef: Parameters, property: KProperty<*>, value: T)

Internal method used by the parameter declaration syntax.