Get status context
parent
74c1d55f72
commit
eb86559702
|
@ -8,5 +8,27 @@ defmodule Hunter.Context do
|
|||
* `descendants` - The descendants of the status in the conversation, as a list of Statuses
|
||||
|
||||
"""
|
||||
@hunter_api Application.get_env(:hunter, :hunter_api)
|
||||
|
||||
@type t :: %__MODULE__{
|
||||
ancestors: [Hunter.Status.t],
|
||||
descendants: [Hunter.Status.t]
|
||||
}
|
||||
|
||||
@derive [Poison.Encoder]
|
||||
defstruct [:ancestors, :descendants]
|
||||
|
||||
@doc """
|
||||
Retrieve status context
|
||||
|
||||
## Parameters
|
||||
|
||||
* `conn` - connection credentials
|
||||
* `id` - status identifier
|
||||
|
||||
"""
|
||||
@spec status_context(Hunter.Client.t, non_neg_integer) :: Hunter.Context.t
|
||||
def status_context(conn, id) do
|
||||
@hunter_api.status_context(conn, id)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue