Class: PivotalAPI::Project
- Defined in:
- lib/pivotal-tracker-api/project.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#account_id ⇒ Object
Returns the value of attribute account_id.
-
#bugs_and_chores_are_estimatable ⇒ Object
Returns the value of attribute bugs_and_chores_are_estimatable.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#current_iteration_number ⇒ Object
Returns the value of attribute current_iteration_number.
-
#current_velocity ⇒ Object
Returns the value of attribute current_velocity.
-
#description ⇒ Object
Returns the value of attribute description.
-
#enable_planned_mode ⇒ Object
Returns the value of attribute enable_planned_mode.
-
#epic_ids ⇒ Object
Returns the value of attribute epic_ids.
-
#has_google_domain ⇒ Object
Returns the value of attribute has_google_domain.
-
#id ⇒ Object
Returns the value of attribute id.
-
#integration_ids ⇒ Object
Returns the value of attribute integration_ids.
-
#iteration_length ⇒ Object
Returns the value of attribute iteration_length.
-
#iteration_override_numbers ⇒ Object
Returns the value of attribute iteration_override_numbers.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#label_ids ⇒ Object
Returns the value of attribute label_ids.
-
#labels ⇒ Object
Returns the value of attribute labels.
-
#membership_ids ⇒ Object
Returns the value of attribute membership_ids.
-
#name ⇒ Object
Returns the value of attribute name.
-
#number_of_done_iterations_to_show ⇒ Object
Returns the value of attribute number_of_done_iterations_to_show.
-
#point_scale ⇒ Object
Returns the value of attribute point_scale.
-
#point_scale_is_custom ⇒ Object
Returns the value of attribute point_scale_is_custom.
-
#profile_content ⇒ Object
Returns the value of attribute profile_content.
-
#public ⇒ Object
Returns the value of attribute public.
-
#shown_iterations_start_time ⇒ Object
Returns the value of attribute shown_iterations_start_time.
-
#start_date ⇒ Object
Returns the value of attribute start_date.
-
#start_time ⇒ Object
Returns the value of attribute start_time.
-
#story_ids ⇒ Object
Returns the value of attribute story_ids.
-
#time_zone ⇒ Object
Returns the value of attribute time_zone.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#velocity_averaged_over ⇒ Object
Returns the value of attribute velocity_averaged_over.
-
#version ⇒ Object
Returns the value of attribute version.
-
#week_start_day ⇒ Object
Returns the value of attribute week_start_day.
Class Method Summary collapse
Instance Method Summary collapse
- #activity(opts = {}) ⇒ Object
- #current_iteration ⇒ Object
- #iterations(opts = {}) ⇒ Object
- #next_iteration ⇒ Object
- #previous_iteration ⇒ Object
- #stories(opts = {}) ⇒ Object
- #story(story_id, opts = {}) ⇒ Object
Methods inherited from Base
Constructor Details
This class inherits a constructor from PivotalAPI::Base
Instance Attribute Details
#account_id ⇒ Object
Returns the value of attribute account_id.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def account_id @account_id end |
#bugs_and_chores_are_estimatable ⇒ Object
Returns the value of attribute bugs_and_chores_are_estimatable.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def bugs_and_chores_are_estimatable @bugs_and_chores_are_estimatable end |
#created_at ⇒ Object
Returns the value of attribute created_at.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def created_at @created_at end |
#current_iteration_number ⇒ Object
Returns the value of attribute current_iteration_number.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def current_iteration_number @current_iteration_number end |
#current_velocity ⇒ Object
Returns the value of attribute current_velocity.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def current_velocity @current_velocity end |
#description ⇒ Object
Returns the value of attribute description.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def description @description end |
#enable_planned_mode ⇒ Object
Returns the value of attribute enable_planned_mode.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def enable_planned_mode @enable_planned_mode end |
#epic_ids ⇒ Object
Returns the value of attribute epic_ids.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def epic_ids @epic_ids end |
#has_google_domain ⇒ Object
Returns the value of attribute has_google_domain.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def has_google_domain @has_google_domain end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def id @id end |
#integration_ids ⇒ Object
Returns the value of attribute integration_ids.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def integration_ids @integration_ids end |
#iteration_length ⇒ Object
Returns the value of attribute iteration_length.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def iteration_length @iteration_length end |
#iteration_override_numbers ⇒ Object
Returns the value of attribute iteration_override_numbers.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def iteration_override_numbers @iteration_override_numbers end |
#kind ⇒ Object
Returns the value of attribute kind.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def kind @kind end |
#label_ids ⇒ Object
Returns the value of attribute label_ids.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def label_ids @label_ids end |
#labels ⇒ Object
Returns the value of attribute labels.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def labels @labels end |
#membership_ids ⇒ Object
Returns the value of attribute membership_ids.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def membership_ids @membership_ids end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def name @name end |
#number_of_done_iterations_to_show ⇒ Object
Returns the value of attribute number_of_done_iterations_to_show.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def number_of_done_iterations_to_show @number_of_done_iterations_to_show end |
#point_scale ⇒ Object
Returns the value of attribute point_scale.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def point_scale @point_scale end |
#point_scale_is_custom ⇒ Object
Returns the value of attribute point_scale_is_custom.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def point_scale_is_custom @point_scale_is_custom end |
#profile_content ⇒ Object
Returns the value of attribute profile_content.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def profile_content @profile_content end |
#public ⇒ Object
Returns the value of attribute public.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def public @public end |
#shown_iterations_start_time ⇒ Object
Returns the value of attribute shown_iterations_start_time.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def shown_iterations_start_time @shown_iterations_start_time end |
#start_date ⇒ Object
Returns the value of attribute start_date.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def start_date @start_date end |
#start_time ⇒ Object
Returns the value of attribute start_time.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def start_time @start_time end |
#story_ids ⇒ Object
Returns the value of attribute story_ids.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def story_ids @story_ids end |
#time_zone ⇒ Object
Returns the value of attribute time_zone.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def time_zone @time_zone end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def updated_at @updated_at end |
#velocity_averaged_over ⇒ Object
Returns the value of attribute velocity_averaged_over.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def velocity_averaged_over @velocity_averaged_over end |
#version ⇒ Object
Returns the value of attribute version.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def version @version end |
#week_start_day ⇒ Object
Returns the value of attribute week_start_day.
4 5 6 |
# File 'lib/pivotal-tracker-api/project.rb', line 4 def week_start_day @week_start_day end |
Class Method Details
.fields ⇒ Object
13 14 15 |
# File 'lib/pivotal-tracker-api/project.rb', line 13 def fields ['description', 'labels', 'name', 'current_velocity', 'velocity_averaged_over'] end |
.from_json(json) ⇒ Object
17 18 19 |
# File 'lib/pivotal-tracker-api/project.rb', line 17 def from_json(json) parse_json_project(json) end |
Instance Method Details
#activity(opts = {}) ⇒ Object
41 42 43 44 45 |
# File 'lib/pivotal-tracker-api/project.rb', line 41 def activity(opts={}) opts[:project_id] = id Service.activity(opts) end |
#current_iteration ⇒ Object
74 75 76 |
# File 'lib/pivotal-tracker-api/project.rb', line 74 def current_iteration iterations.first end |
#iterations(opts = {}) ⇒ Object
66 67 68 69 70 71 72 |
# File 'lib/pivotal-tracker-api/project.rb', line 66 def iterations(opts={}) opts[:project_id] = id opts[:parameters] = {} unless opts[:parameters] opts[:fields] = Iteration.fields if opts[:fields].nil? Service.iterations(opts) end |
#next_iteration ⇒ Object
82 83 84 |
# File 'lib/pivotal-tracker-api/project.rb', line 82 def next_iteration iterations(scope: 'backlog').first end |
#previous_iteration ⇒ Object
78 79 80 |
# File 'lib/pivotal-tracker-api/project.rb', line 78 def previous_iteration iterations(scope: 'done').first end |
#stories(opts = {}) ⇒ Object
58 59 60 61 62 63 64 |
# File 'lib/pivotal-tracker-api/project.rb', line 58 def stories(opts={}) opts[:project_id] = id opts[:parameters] = {} unless opts[:parameters] opts[:parameters][:fields] = Story.fields Service.stories(opts) end |
#story(story_id, opts = {}) ⇒ Object
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/pivotal-tracker-api/project.rb', line 47 def story(story_id, opts={}) opts[:project_id] = id opts[:story_id] = story_id opts[:parameters] = {} unless opts[:parameters] opts[:parameters][:fields] = Story.fields story = Service.story(opts) story.project_id = id if story && story.project_id.nil? story end |