jirex v0.0.2 Jirex.Issue

Jirex.Issue provides functions to manage JIRA Issues. It also provides a Struct for JIRA Issues for easy access of values.

Functions

- get/1
- search/1

Summary

Functions

The get/1 function takes a String type id and it returns a tuple containing the status and the issue itself as a Jirex.Issue struct

The search/1 function takes a Map type filters and it returns a tuple containing the status and the list of matching issues as a Jirex.Issue struct

Types

issue()
issue() :: Jirex.Issue

Functions

get(id)
get(String.t) :: {:ok, issue} | {:error, String.t}

The get/1 function takes a String type id and it returns a tuple containing the status and the issue itself as a Jirex.Issue struct.

Examples

iex> Jirex.Issue.get("ISU-12")
{:ok, %Jirex.Issue{assignee: "Juan del Pueblo", status: "In Progress", summary: "Hello", desciption: "weepaaa"}}

iex> Jirex.Issue.get("unknown")
{:error, error}
search(filter)
search(map) :: {:ok, list} | {:error, String.t}

The search/1 function takes a Map type filters and it returns a tuple containing the status and the list of matching issues as a Jirex.Issue struct.

Examples

iex> Jirex.Issue.search(%{"status" => 3})
{:ok, [%Jirex.Issue{assignee: "Juan del Pueblo", status: "In Progress", summary: "Hello", desciption: "weepaaa"}]}

iex> Jirex.Issue.get(%{"wepaaa" => "boricua"})
{:error, error}