Current section

Files

Jump to
noizu_github lib api structs webhooks_project_card.ex
Raw

lib/api/structs/webhooks_project_card.ex

# Generated by `mix github.gen` from docs/github-api/api.github.com.json.
# Do not edit by hand; re-run the task instead.
defmodule Noizu.Github.WebhooksProjectCard do
@moduledoc false
defstruct [
:after_id,
:archived,
:column_id,
:column_url,
:content_url,
:created_at,
:creator,
:id,
:node_id,
:note,
:project_url,
:updated_at,
:url
]
def from_json(json, headers \\ [])
def from_json(nil, _headers), do: nil
def from_json(list, headers) when is_list(list) do
Enum.map(list, &from_json(&1, headers))
end
def from_json(json, _headers) when is_map(json) do
%__MODULE__{
after_id: Map.get(json, :after_id),
archived: Map.get(json, :archived),
column_id: Map.get(json, :column_id),
column_url: Map.get(json, :column_url),
content_url: Map.get(json, :content_url),
created_at: Map.get(json, :created_at),
creator: Map.get(json, :creator),
id: Map.get(json, :id),
node_id: Map.get(json, :node_id),
note: Map.get(json, :note),
project_url: Map.get(json, :project_url),
updated_at: Map.get(json, :updated_at),
url: Map.get(json, :url)
}
end
def from_json(other, _headers), do: other
end