CompanionObj

A companion object for the resource.

Parameters

R

The type of the resource.

Properties

Link copied to clipboard
abstract val config: JsonApiConfig

The configuration of the resource.

Link copied to clipboard
abstract val endpoint: String

The endpoint of the resource.

Link copied to clipboard
abstract val factory: () -> R

The factory for the resource.

Link copied to clipboard
abstract val resourceType: String

The type of the resource.

Link copied to clipboard
abstract val schema: KClass<*>

The schema of the resource.

Functions

Link copied to clipboard
open fun fromJsonApi(jsonApiResponse: JsonApiSingleResponse)
open fun fromJsonApi(jsonApiData: JsonApiResource, included: List<JsonApiResource>)

Deserialize the resource from a JSON:API response.

Link copied to clipboard
open fun urlForResource(resource: Resource? = null, id: String? = null): String

Create a new instance of the resource.