Ltix.LaunchClaims.Context (Ltix v0.1.0)

Copy Markdown View Source

The context (e.g. course or section) in which the launch occurs.

id is required and uniquely identifies the context within a deployment.

Examples

iex> Ltix.LaunchClaims.Context.from_json(%{"id" => "ctx-1", "label" => "CS101"})
{:ok, %Ltix.LaunchClaims.Context{id: "ctx-1", label: "CS101", title: nil, type: nil}}

Summary

Functions

Parse a context claim from a JSON map.

Types

t()

@type t() :: %Ltix.LaunchClaims.Context{
  id: binary(),
  label: binary(),
  title: binary(),
  type: [binary()]
}

Functions

from_json(json)

@spec from_json(map()) :: {:ok, t()} | {:error, Exception.t()}

Parse a context claim from a JSON map.

Examples

iex> Ltix.LaunchClaims.Context.from_json(%{"id" => "ctx-1"})
{:ok, %Ltix.LaunchClaims.Context{id: "ctx-1", label: nil, title: nil, type: nil}}