Class: YouTrack::Client::GetProjectCustomFields
- Inherits:
-
Request
- Object
- Request
- YouTrack::Client::GetProjectCustomFields
show all
- Defined in:
- lib/you_track/client/requests/get_project_custom_fields.rb
Overview
Instance Method Summary
collapse
Methods inherited from Request
#find, #ms_time, #require_parameters
Instance Method Details
#mock(id) ⇒ Object
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# File 'lib/you_track/client/requests/get_project_custom_fields.rb', line 10
def mock(id)
prototypes = find(:project_custom_fields, id)
body = prototypes.inject([]) { |r,p|
name = p.fetch("name")
r << {
"name" => name,
"url" => service.url_for("/admin/project/#{id}/#{name}"),
}
}
service.response(body: body)
end
|
#real(id) ⇒ Object
3
4
5
6
7
8
|
# File 'lib/you_track/client/requests/get_project_custom_fields.rb', line 3
def real(id)
service.request(
:path => "/admin/project/#{id}/customfield",
:parser => YouTrack::Parser::ProjectCustomFieldsParser,
)
end
|