Class: YouTrack::Client::GetProjects
- Inherits:
-
Request
- Object
- Request
- YouTrack::Client::GetProjects
show all
- Defined in:
- lib/you_track/client/requests/get_projects.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Request
#find, #ms_time, #require_parameters
Class Method Details
.attributes ⇒ Object
3
4
5
|
# File 'lib/you_track/client/requests/get_projects.rb', line 3
def self.attributes
@_attributes ||= %w[name shortName isImporting subsystems assignees versions]
end
|
Instance Method Details
#mock ⇒ Object
15
16
17
18
19
|
# File 'lib/you_track/client/requests/get_projects.rb', line 15
def mock
service.response(
:body => service.data[:projects].values.map { |p| Cistern::Hash.slice(p, *self.class.attributes) }
)
end
|
#real ⇒ Object
7
8
9
10
11
12
13
|
# File 'lib/you_track/client/requests/get_projects.rb', line 7
def real
service.request(
:path => "/project/all",
:parser => YouTrack::Parser::ProjectsParser,
:query => {"verbose" => true},
)
end
|