View Source PhoenixRestFramework.Resource behaviour (Phoenix Rest Framework v0.2.0)

Link to this section Summary

Link to this section Types

@type record() :: struct() | map()

Link to this section Callbacks

@callback create(attrs :: any()) :: {:ok, record()}
@callback delete(record()) :: {:ok, record :: any()}
@callback get(id :: any()) :: {:ok, record()}
@callback list() :: {:ok, records} when records: list()
@callback update(record(), attrs :: any()) :: {:ok, record()}