pivit 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +1 -1
- data/lib/pivit/client/activity.rb +11 -11
- data/lib/pivit/client/iteration.rb +9 -9
- data/lib/pivit/client/membership.rb +13 -24
- data/lib/pivit/client/project.rb +12 -15
- data/lib/pivit/client/story.rb +22 -29
- data/lib/pivit/client/task.rb +11 -19
- data/lib/pivit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OGZiYmQ4OGFhZGNiZGVkMTFiYmMyMDIyNGE2ODUzZjU3YzdkZDhmZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjZmZjhhODE2ZWY2Y2Y3YmM3NTUyM2I4MGQ5NzY5NmZmMDA0ODE2Nw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MDRmNTllMjEzOGM2ZTkxOTlkMWFiZTJiYzQzYTAxYTZhZGFiMzUyZGE1ODli
|
10
|
+
NjFhMGVhMjE0OGQxMTRiMTMyMmFmYzZlMzJhYTNmNmU0N2E4MmNmYmZlYmYx
|
11
|
+
ZTUyZjE5MWIyOTMwNWE4MWMyZjdiN2ZjOTYyMjgxZWU1NjJjM2I=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZmNiNGEzODFhNTQzYTRlNzIyNjRkOWJkNjg4NzQ3OGRmMWE2MDIwZjA1NWMy
|
14
|
+
NDlhOTgyMDQ5YTA1ZDgyYzNmMGYzNTgyMTcxOTg5YTFhN2RmZWViZTFiMWRi
|
15
|
+
ZWY2M2E5Zjc4YWJmY2M3YWE5NzMxN2EwYTU3ZGRiYmYyZDM0YWI=
|
data/README.md
CHANGED
@@ -2,29 +2,29 @@ module Pivit
|
|
2
2
|
class Client
|
3
3
|
# Activity management
|
4
4
|
#
|
5
|
-
# @see
|
5
|
+
# @see https://www.pivotaltracker.com/help/api?version=v3#get_activity
|
6
6
|
module Activity
|
7
7
|
# Retrieve all activity from your account
|
8
8
|
#
|
9
9
|
# Pass any of the specified query parameters via options
|
10
|
+
#
|
10
11
|
# Available from Pivotal Tracker:
|
11
|
-
# limit - you can limit the number of activity feed items to a desired
|
12
|
-
# number. Note the default value is 10, and there is a upper cap of 100
|
13
|
-
# occurred_since_date - allows restricting the activity feed to only those
|
14
|
-
# items that occurred after a supplied date (example format: 2009/12/18
|
15
|
-
# 21:00:00 UTC)
|
16
|
-
# newer_than_version - allows restricting the activity feed to only those
|
17
|
-
# items that have a greater than supplied version
|
18
12
|
#
|
19
|
-
#
|
13
|
+
# limit - you can limit the number of activity feed items to a desired number. Note the default value is 10, and there is a upper cap of 100
|
14
|
+
#
|
15
|
+
# occurred_since_date - allows restricting the activity feed to only those items that occurred after a supplied date (example format: 2009/12/18 21:00:00 UTC)
|
16
|
+
#
|
17
|
+
# newer_than_version - allows restricting the activity feed to only those items that have a greater than supplied version
|
18
|
+
#
|
19
|
+
# @see https://www.pivotaltracker.com/help/api?version=v3#get_activity
|
20
20
|
#
|
21
21
|
# @return [Hashie::Mash] activity response
|
22
22
|
#
|
23
|
-
# @example
|
23
|
+
# @example
|
24
24
|
# Pivit::Client.activity
|
25
25
|
#
|
26
26
|
# Pivit::Client.activity({:limit => 50})
|
27
|
-
#
|
27
|
+
#
|
28
28
|
# @author Jason Truluck
|
29
29
|
def activity(options = {})
|
30
30
|
get("activities", options).activities
|
@@ -2,11 +2,11 @@ module Pivit
|
|
2
2
|
class Client
|
3
3
|
# Iteration management
|
4
4
|
#
|
5
|
-
# @see
|
5
|
+
# @see https://www.pivotaltracker.com/help/api?version=v3#get_iterations
|
6
6
|
module Iteration
|
7
7
|
# Retrieve all iterations from the project
|
8
8
|
#
|
9
|
-
# @see
|
9
|
+
# @see https://www.pivotaltracker.com/help/api?version=v3#get_iterations
|
10
10
|
#
|
11
11
|
# @param project_id the id of the project
|
12
12
|
#
|
@@ -22,7 +22,7 @@ module Pivit
|
|
22
22
|
|
23
23
|
# Retrieve all done iterations from the project
|
24
24
|
#
|
25
|
-
# @see
|
25
|
+
# @see https://www.pivotaltracker.com/help/api?version=v3#get_iterations
|
26
26
|
#
|
27
27
|
# @param project_id the id of the project
|
28
28
|
#
|
@@ -36,9 +36,9 @@ module Pivit
|
|
36
36
|
get("projects/#{project_id}/iterations/done", options).iterations
|
37
37
|
end
|
38
38
|
|
39
|
-
# Retrieve all iterations from the project
|
39
|
+
# Retrieve all backlog iterations group from the project
|
40
40
|
#
|
41
|
-
# @see
|
41
|
+
# @see https://www.pivotaltracker.com/help/api?version=v3#get_iterations
|
42
42
|
#
|
43
43
|
# @param project_id the id of the project
|
44
44
|
#
|
@@ -52,9 +52,9 @@ module Pivit
|
|
52
52
|
get("projects/#{project_id}/iterations/backlog", options).iterations
|
53
53
|
end
|
54
54
|
|
55
|
-
# Retrieve all iterations from the project
|
55
|
+
# Retrieve all current iterations group from the project
|
56
56
|
#
|
57
|
-
# @see
|
57
|
+
# @see https://www.pivotaltracker.com/help/api?version=v3#get_iterations
|
58
58
|
#
|
59
59
|
# @param project_id the id of the project
|
60
60
|
#
|
@@ -68,9 +68,9 @@ module Pivit
|
|
68
68
|
get("projects/#{project_id}/iterations/current", options).iterations
|
69
69
|
end
|
70
70
|
|
71
|
-
# Retrieve all iterations from the project
|
71
|
+
# Retrieve all current and backlog iterations from the project
|
72
72
|
#
|
73
|
-
# @see
|
73
|
+
# @see https://www.pivotaltracker.com/help/api?version=v3#get_iterations
|
74
74
|
#
|
75
75
|
# @param project_id the id of the project
|
76
76
|
#
|
@@ -4,19 +4,14 @@ module Pivit
|
|
4
4
|
class Client
|
5
5
|
# Membership management
|
6
6
|
#
|
7
|
-
# @see
|
7
|
+
# @see https://www.pivotaltracker.com/help/api?version=v3#get_memberships
|
8
8
|
module Membership
|
9
9
|
# Retrieve a single membership from your account
|
10
10
|
#
|
11
|
-
# @see
|
11
|
+
# @see https://www.pivotaltracker.com/help/api?version=v3#get_membership_info
|
12
12
|
#
|
13
|
-
# @param [Integer] project_id the id of the project that you want to
|
14
|
-
#
|
15
|
-
# @param [Integer] membership_id the id of the membership that you want to
|
16
|
-
# retrieve
|
17
|
-
#
|
18
|
-
# @param [Integer] project_id the id of the project that contains the
|
19
|
-
# membership
|
13
|
+
# @param [Integer] project_id the id of the project that you want to retrieve memberships from
|
14
|
+
# @param [Integer] membership_id the id of the membership that you want to retrieve
|
20
15
|
#
|
21
16
|
# @return [Hashie::Mash] membership response
|
22
17
|
#
|
@@ -30,10 +25,9 @@ module Pivit
|
|
30
25
|
|
31
26
|
# Retrieve all memberships from your account
|
32
27
|
#
|
33
|
-
# @see
|
28
|
+
# @see https://www.pivotaltracker.com/help/api?version=v3#get_memberships
|
34
29
|
#
|
35
|
-
# @param [Integer] project_id the id of the project that contains the
|
36
|
-
#memberships
|
30
|
+
# @param [Integer] project_id the id of the project that contains the memberships
|
37
31
|
#
|
38
32
|
# @return [Hashie::Mash] memberships response
|
39
33
|
#
|
@@ -47,16 +41,13 @@ module Pivit
|
|
47
41
|
|
48
42
|
# Create a membership
|
49
43
|
#
|
50
|
-
# Provide the parameters you want to use for the membership via the options
|
51
|
-
# hash.
|
44
|
+
# Provide the parameters you want to use for the membership via the options hash.
|
52
45
|
#
|
53
46
|
# @see http://www.pivotaltracker.com/help/api?version=v3#add_membership
|
54
47
|
#
|
55
|
-
# @param [Integer] project_id the id of the project that contains the
|
56
|
-
#
|
57
|
-
# @param [
|
58
|
-
# added
|
59
|
-
# @param [Integer] role the role of the member that is being added
|
48
|
+
# @param [Integer] project_id the id of the project that contains the membership
|
49
|
+
# @param [String] email the email address of the member that is being added
|
50
|
+
# @param [String] role the role of the member that is being added
|
60
51
|
#
|
61
52
|
# @return [Hashie::Mash] membership created response
|
62
53
|
#
|
@@ -68,14 +59,12 @@ module Pivit
|
|
68
59
|
options.merge!({ :membership => { :role => role, :person => { :email => email }}})
|
69
60
|
post("projects/#{project_id}/memberships", options).membership
|
70
61
|
end
|
71
|
-
|
62
|
+
|
72
63
|
# Delete a membership
|
73
|
-
#
|
74
64
|
#
|
75
|
-
# @see
|
65
|
+
# @see https://www.pivotaltracker.com/help/api?version=v3#remove_membership
|
76
66
|
#
|
77
|
-
# @param [Integer] project_id the id of the project that contains the
|
78
|
-
# membership
|
67
|
+
# @param [Integer] project_id the id of the project that contains the membership
|
79
68
|
# @param [Integer] membership_id the id of the membership that is getting deleted
|
80
69
|
#
|
81
70
|
# @return [Hashie::Mash] membership deleted response
|
data/lib/pivit/client/project.rb
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
module Pivit
|
2
2
|
class Client
|
3
3
|
# Project management
|
4
|
-
#
|
4
|
+
#
|
5
5
|
# @see http://www.pivotaltracker.com/help/api?version=v3#getting_projects
|
6
6
|
module Project
|
7
7
|
# Retrieve a single project from your account
|
8
8
|
#
|
9
|
-
# @see
|
9
|
+
# @see https://www.pivotaltracker.com/help/api?version=v3#get_project_info
|
10
10
|
#
|
11
|
-
# @param [Integer] project_id the id of the project that you want to
|
12
|
-
# retrieve
|
11
|
+
# @param [Integer] project_id the id of the project that you want to retrieve
|
13
12
|
#
|
14
13
|
# @return [Hashie::Mash] project response
|
15
14
|
#
|
@@ -23,31 +22,29 @@ module Pivit
|
|
23
22
|
|
24
23
|
# Retrieve all projects from your account
|
25
24
|
#
|
26
|
-
# @see
|
25
|
+
# @see https://www.pivotaltracker.com/help/api?version=v3#get_project_all_projects
|
27
26
|
#
|
28
27
|
# @return [Hashie::Mash] projects response
|
29
28
|
#
|
30
|
-
# @example
|
31
|
-
# Pivit::Client.
|
32
|
-
#
|
29
|
+
# @example
|
30
|
+
# Pivit::Client.projects
|
31
|
+
#
|
33
32
|
# @author Jason Truluck
|
34
33
|
def projects(options = {})
|
35
34
|
get("projects", options).projects
|
36
35
|
end
|
37
36
|
|
38
37
|
# Create a Project
|
39
|
-
#
|
40
|
-
# Provide the parameters you wantt to use for the project via the options
|
41
|
-
# hash
|
38
|
+
#
|
39
|
+
# Provide the parameters you wantt to use for the project via the options hash
|
42
40
|
#
|
43
41
|
# @see http://www.pivotaltracker.com/help/api?version=v3#create_project
|
44
42
|
#
|
45
43
|
# @return [Hashie::Mash] project created response
|
46
44
|
#
|
47
|
-
# @example
|
48
|
-
# Pivit::Client.create_project({:name => "Test Project", :iteration_length
|
49
|
-
#
|
50
|
-
#
|
45
|
+
# @example
|
46
|
+
# Pivit::Client.create_project({:name => "Test Project", :iteration_length => "2"})
|
47
|
+
#
|
51
48
|
# @author Jason Truluck
|
52
49
|
def create_project(options = {})
|
53
50
|
options = { :project => options }
|
data/lib/pivit/client/story.rb
CHANGED
@@ -10,13 +10,8 @@ module Pivit
|
|
10
10
|
#
|
11
11
|
# @see http://www.pivotaltracker.com/help/api?version=v3#getting_stories
|
12
12
|
#
|
13
|
-
# @param [Integer] project_id the id of the project that you want to
|
14
|
-
#
|
15
|
-
# @param [Integer] story_id the id of the story that you want to
|
16
|
-
# retrieve
|
17
|
-
#
|
18
|
-
# @param [Integer] project_id the id of the project that contains the
|
19
|
-
# story
|
13
|
+
# @param [Integer] project_id the id of the project that you want to retrieve stories from
|
14
|
+
# @param [Integer] story_id the id of the story that you want to retrieve
|
20
15
|
#
|
21
16
|
# @return [Hashie::Mash] story response
|
22
17
|
#
|
@@ -32,13 +27,20 @@ module Pivit
|
|
32
27
|
#
|
33
28
|
# @see http://www.pivotaltracker.com/help/api?version=v3#getting_stories
|
34
29
|
#
|
35
|
-
#
|
36
|
-
#
|
30
|
+
# You can also use any filter option provided by pivotal tracker by
|
31
|
+
# prefacing with the option :filter
|
32
|
+
#
|
33
|
+
# @see https://www.pivotaltracker.com/help/faq#howcanasearchberefined
|
34
|
+
#
|
35
|
+
# @param [Integer] project_id the id of the project that contains the stories
|
37
36
|
#
|
38
37
|
# @return [Hashie::Mash] stories response
|
39
38
|
#
|
40
39
|
# @example
|
41
40
|
# Pivit::Client.stories(1111111)
|
41
|
+
#
|
42
|
+
#
|
43
|
+
# Pivit::Client.stories(1111111, {:filter => "type:bug,chore"})
|
42
44
|
#
|
43
45
|
# @author Jason Truluck
|
44
46
|
def stories(project_id, options = {})
|
@@ -47,18 +49,16 @@ module Pivit
|
|
47
49
|
|
48
50
|
# Create a story
|
49
51
|
#
|
50
|
-
# Provide the parameters you want to use for the story via the options
|
51
|
-
# hash
|
52
|
+
# Provide the parameters you want to use for the story via the options hash
|
52
53
|
#
|
53
54
|
# @see http://www.pivotaltracker.com/help/api?version=v3#add_story
|
54
55
|
#
|
55
|
-
# @param [Integer] project_id the id of the project that contains the
|
56
|
-
# story
|
56
|
+
# @param [Integer] project_id the id of the project that contains the story
|
57
57
|
#
|
58
58
|
# @return [Hashie::Mash] story created response
|
59
59
|
#
|
60
60
|
# @example
|
61
|
-
# Pivit::Client.
|
61
|
+
# Pivit::Client.create_story({:type => "feature", :name => "Story"})
|
62
62
|
#
|
63
63
|
# @author Jason Truluck
|
64
64
|
def create_story(project_id, options = {})
|
@@ -73,14 +73,13 @@ module Pivit
|
|
73
73
|
#
|
74
74
|
# @see http://www.pivotaltracker.com/help/api?version=v3#update_story
|
75
75
|
#
|
76
|
-
# @param [Integer] project_id the id of the project that contains the
|
77
|
-
# story
|
76
|
+
# @param [Integer] project_id the id of the project that contains the story
|
78
77
|
# @param [Integer] story_id the id of the story that is getting updated
|
79
78
|
#
|
80
79
|
# @return [Hashie::Mash] story updated response
|
81
80
|
#
|
82
81
|
# @example
|
83
|
-
# Pivit::Client.update_story(12345, 11111, {
|
82
|
+
# Pivit::Client.update_story(12345, 11111, {:name => "awesome new story name"})
|
84
83
|
#
|
85
84
|
# @author Jason Truluck
|
86
85
|
def update_story(project_id, story_id, options = {})
|
@@ -89,18 +88,16 @@ module Pivit
|
|
89
88
|
end
|
90
89
|
|
91
90
|
# Delete a story
|
92
|
-
#
|
93
91
|
#
|
94
92
|
# @see http://www.pivotaltracker.com/help/api?version=v3#delete_story
|
95
93
|
#
|
96
|
-
# @param [Integer] project_id the id of the project that contains the
|
97
|
-
# story
|
94
|
+
# @param [Integer] project_id the id of the project that contains the story
|
98
95
|
# @param [Integer] story_id the id of the story that is getting deleted
|
99
96
|
#
|
100
97
|
# @return [Hashie::Mash] story deleted response
|
101
98
|
#
|
102
99
|
# @example
|
103
|
-
# Pivit::Client.
|
100
|
+
# Pivit::Client.delete_story(12345, 11111)
|
104
101
|
##
|
105
102
|
# @author Jason Truluck
|
106
103
|
def delete_story(project_id, story_id, options = {})
|
@@ -111,11 +108,9 @@ module Pivit
|
|
111
108
|
#
|
112
109
|
# @see http://www.pivotaltracker.com/help/api?version=v3#move_story
|
113
110
|
#
|
114
|
-
# @param [Integer] project_id the id of the project that contains the
|
115
|
-
# story
|
111
|
+
# @param [Integer] project_id the id of the project that contains the story
|
116
112
|
# @param [Integer] story_id the id of the story that is getting moved
|
117
|
-
# @param [Integer] story_target_id the id of the story that the other
|
118
|
-
# story is moving before
|
113
|
+
# @param [Integer] story_target_id the id of the story that the other story is moving before
|
119
114
|
#
|
120
115
|
# @return [Hashie::Mash] story move response
|
121
116
|
#
|
@@ -131,11 +126,9 @@ module Pivit
|
|
131
126
|
#
|
132
127
|
# @see http://www.pivotaltracker.com/help/api?version=v3#move_story
|
133
128
|
#
|
134
|
-
# @param [Integer] project_id the id of the project that contains the
|
135
|
-
# story
|
129
|
+
# @param [Integer] project_id the id of the project that contains the story
|
136
130
|
# @param [Integer] story_id the id of the story that is getting moved
|
137
|
-
# @param [Integer] story_target_id the id of the story that the other
|
138
|
-
# story is moving after
|
131
|
+
# @param [Integer] story_target_id the id of the story that the other story is moving after
|
139
132
|
#
|
140
133
|
# @return [Hashie::Mash] story move response
|
141
134
|
#
|
data/lib/pivit/client/task.rb
CHANGED
@@ -4,21 +4,15 @@ module Pivit
|
|
4
4
|
class Client
|
5
5
|
# Task management
|
6
6
|
#
|
7
|
-
# @see http://www.pivotaltracker.com/help/api?version=v3#
|
7
|
+
# @see http://www.pivotaltracker.com/help/api?version=v3#tasks
|
8
8
|
module Task
|
9
9
|
# Retrieve a single task from your account
|
10
10
|
#
|
11
|
-
# @see http://www.pivotaltracker.com/help/api?version=v3#
|
11
|
+
# @see http://www.pivotaltracker.com/help/api?version=v3#view_task
|
12
12
|
#
|
13
|
-
# @param [Integer] project_id the id of the project that you want to
|
14
|
-
#
|
15
|
-
# @param [Integer]
|
16
|
-
# retrieve
|
17
|
-
# @param [Integer] task_id the id of the task that you want to
|
18
|
-
# retrieve
|
19
|
-
#
|
20
|
-
# @param [Integer] project_id the id of the project that contains the
|
21
|
-
# task
|
13
|
+
# @param [Integer] project_id the id of the project that you want to retrieve stories from
|
14
|
+
# @param [Integer] story_id the id of the story that you want to retrieve
|
15
|
+
# @param [Integer] task_id the id of the task that you want to retrieve
|
22
16
|
#
|
23
17
|
# @return [Hashie::Mash] task response
|
24
18
|
#
|
@@ -32,7 +26,7 @@ module Pivit
|
|
32
26
|
|
33
27
|
# Retrieve all tasks from a story
|
34
28
|
#
|
35
|
-
# @see http://www.pivotaltracker.com/help/api?version=v3#
|
29
|
+
# @see http://www.pivotaltracker.com/help/api?version=v3#view_tasks
|
36
30
|
#
|
37
31
|
# @param [Integer] project_id the id of the project that contains the stories
|
38
32
|
# @param [Integer] stroy_id the id of the story that contains the tasks
|
@@ -49,8 +43,7 @@ module Pivit
|
|
49
43
|
|
50
44
|
# Create a task
|
51
45
|
#
|
52
|
-
# Provide the parameters you want to use for the task via the options
|
53
|
-
# hash
|
46
|
+
# Provide the parameters you want to use for the task via the options hash
|
54
47
|
#
|
55
48
|
# @see http://www.pivotaltracker.com/help/api?version=v3#add_task
|
56
49
|
#
|
@@ -60,7 +53,7 @@ module Pivit
|
|
60
53
|
# @return [Hashie::Mash] task created response
|
61
54
|
#
|
62
55
|
# @example
|
63
|
-
# Pivit::Client.
|
56
|
+
# Pivit::Client.create_task({:type=> "feature", :name => "Task"})
|
64
57
|
#
|
65
58
|
# @author Jason Truluck
|
66
59
|
def create_task(project_id, story_id, options = {})
|
@@ -70,8 +63,7 @@ module Pivit
|
|
70
63
|
|
71
64
|
# Update a task
|
72
65
|
#
|
73
|
-
# Provide the parameters you want to use for the task via the options
|
74
|
-
# hash
|
66
|
+
# Provide the parameters you want to use for the task via the options hash
|
75
67
|
#
|
76
68
|
# @see http://www.pivotaltracker.com/help/api?version=v3#update_task
|
77
69
|
#
|
@@ -82,7 +74,7 @@ module Pivit
|
|
82
74
|
# @return [Hashie::Mash] task updated response
|
83
75
|
#
|
84
76
|
# @example
|
85
|
-
# Pivit::Client.update_task(12345, 11111, 67890, {
|
77
|
+
# Pivit::Client.update_task(12345, 11111, 67890, {:name => "awesome new task name"})
|
86
78
|
#
|
87
79
|
# @author Jason Truluck
|
88
80
|
def update_task(project_id, story_id, task_id, options = {})
|
@@ -101,7 +93,7 @@ module Pivit
|
|
101
93
|
# @return [Hashie::Mash] task deleted response
|
102
94
|
#
|
103
95
|
# @example
|
104
|
-
# Pivit::Client.
|
96
|
+
# Pivit::Client.delete_task(12345, 11111, 67890)
|
105
97
|
#
|
106
98
|
# @author Jason Truluck
|
107
99
|
def delete_task(project_id, story_id, task_id, options = {})
|
data/lib/pivit/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pivit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Truluck
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|