View Source Jiraffe.User (Jiraffe v0.1.0)

This resource represent users. Use it to:

  • get, get a list of, create, and delete users.
  • get, set, and reset a user's default issue table columns.
  • get a list of the groups the user belongs to.
  • get a list of user account IDs for a list of usernames or user keys.

Summary

Functions

(EXPERIMENTAL) Returns a page of users matching the provided criteria.

(EXPERIMENTAL) Returns all users matching the provided criteria (see Jiraffe.User.bulk_get/2)

(EXPERIMENTAL) Returns a stream of pages (see Jiraffe.User.bulk_get/2) of users matching the provided criteria.

Converts a map (received from Jira API) to Jiraffe.User struct.

Types

@type account_id() :: String.t()
@type bulk_get_params() :: [
  start_at: non_neg_integer(),
  max_results: non_neg_integer(),
  account_ids: [account_id()]
]
@type t() :: %Jiraffe.User{
  account_id: account_id(),
  account_type: String.t(),
  active?: boolean(),
  avatar_urls: Jiraffe.Avatar.Url.t(),
  display_name: String.t(),
  email_address: String.t() | nil,
  self: String.t(),
  time_zone: String.t() | nil
}

Functions

Link to this function

bulk_get(client, params)

View Source
@spec bulk_get(
  Jiraffe.client(),
  params :: bulk_get_params()
) :: {:ok, Jiraffe.ResultsPage} | {:error, Jiraffe.Error.t()}

(EXPERIMENTAL) Returns a page of users matching the provided criteria.

Rerefence

Link to this function

bulk_get_all(client, params)

View Source
@spec bulk_get_all(
  Jiraffe.client(),
  params :: bulk_get_params()
) :: {:ok, [t()]} | {:error, Jiraffe.Error.t()}

(EXPERIMENTAL) Returns all users matching the provided criteria (see Jiraffe.User.bulk_get/2)

Link to this function

bulk_get_stream(client, params)

View Source
@spec bulk_get_stream(
  Jiraffe.client(),
  params :: bulk_get_params()
) :: Enum.t() | {:error, Jiraffe.Error.t()}

(EXPERIMENTAL) Returns a stream of pages (see Jiraffe.User.bulk_get/2) of users matching the provided criteria.

Converts a map (received from Jira API) to Jiraffe.User struct.

  • self - The URL of the user
  • account_id - The account ID of the user
  • email_address - The email address of the user
  • avatar_urls - The avatar URLs of the user (see Jiraffe.Avatar.Url)
  • display_name - The display name of the user
  • active? - Whether the user is active
  • time_zone - The time zone specified in the user's profile
  • account_type - The type of account represented by this user