Class: Terjira::Client::Project

Inherits:
Base
  • Object
show all
Defined in:
lib/terjira/client/project.rb

Overview

Project Client Baseed on jira-ruby gem

Constant Summary

Constants inherited from Base

Base::AGILE_API_PATH, Base::DEFAULT_API_PATH, Base::DEFAULT_CACHE_SEC

Constants included from JQLBuilder

JQLBuilder::SEARCH_KEYS, JQLBuilder::STRICT_KEYS

Constants included from AuthOptionBuilder

AuthOptionBuilder::AUTH_CACHE_KEY

Class Method Summary collapse

Methods inherited from Base

cache, class_name, client, parse_body, resource, site_url, username

Methods included from JQLBuilder

#build_jql

Methods included from AuthOptionBuilder

#auth_file_cache, #build_auth_options, #build_auth_options_by_cached, #build_auth_options_by_tty, #expire_auth_options

Class Method Details

.allObject



10
11
12
13
14
# File 'lib/terjira/client/project.rb', line 10

def all
  expand = %w(description lead issueTypes url projectKeys)
  resp = api_get 'project', expand: expand.join(',')
  resp.map { |project| build(project) }
end

.all_by_board(board) ⇒ Object



16
17
18
19
20
21
# File 'lib/terjira/client/project.rb', line 16

def all_by_board(board)
  resp = agile_api_get "board/#{board.key_value}/project"
  resp['values'].map do |project|
    build(project)
  end
end