researchable-freedcamp-api 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11f12801b1a72e9d12e6b00df889dcc75a94b1a4575faa8b50ec2930165ee1e6
|
4
|
+
data.tar.gz: 0bfd8c06d163eb9e5a4c822ad6dde5d06128ef76ec7b311cdbc0958c716a6331
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c80ecb8f21cc98e516c2df31be6183cfb317f732a6ce711ac286118e092b7b1083795bafdcd203494489e3b08c0828c94386bbfd20fd6b982bfbae95ce3f451
|
7
|
+
data.tar.gz: 155b549f426c4fce1e0f2d56208361f5488082a6b3d07196b169a8ad09ec7c79aa51c357fae40abd9b41d0e65aedb5db761572ce739477a08231432442ef0e4e
|
@@ -1 +1,34 @@
|
|
1
|
-
# typed:
|
1
|
+
# typed: false
|
2
|
+
module Researchable
|
3
|
+
module FreedcampApi
|
4
|
+
class ListMilestones < Endpoint
|
5
|
+
integer :milestone_id, default: nil
|
6
|
+
integer :project_id, default: nil
|
7
|
+
integer :f_cf, default: 1
|
8
|
+
|
9
|
+
def execute
|
10
|
+
list_milestones(milestone_id)
|
11
|
+
end
|
12
|
+
|
13
|
+
# sig do
|
14
|
+
# params(
|
15
|
+
# task_id: T.nilable(Integer)
|
16
|
+
# ).returns(
|
17
|
+
# T::Array[Researchable::FreedcampApi::Structs::Task]
|
18
|
+
# )
|
19
|
+
# end
|
20
|
+
def list_milestones(milestone_id)
|
21
|
+
milestone_query = milestone_id ? "/#{milestone_id}" : '/'
|
22
|
+
project_query = project_id ? "&project_id=#{project_id}" : ''
|
23
|
+
custom_fields_query = f_cf.nil? ? '' : "&f_cf=#{f_cf}"
|
24
|
+
fetch_all('milestones') do |limit, offset|
|
25
|
+
url = "/milestones#{milestone_query}?limit=#{limit}
|
26
|
+
#{project_query}
|
27
|
+
#{custom_fields_query}
|
28
|
+
&offset=#{offset}"
|
29
|
+
session.get(url)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -10,6 +10,7 @@ require_relative 'freedcamp_api/endpoint'
|
|
10
10
|
|
11
11
|
require_relative 'freedcamp_api/list_projects'
|
12
12
|
|
13
|
+
|
13
14
|
require_relative 'freedcamp_api/list_tasks'
|
14
15
|
require_relative 'freedcamp_api/update_task'
|
15
16
|
require_relative 'freedcamp_api/create_task'
|
@@ -18,6 +19,8 @@ require_relative 'freedcamp_api/get_user'
|
|
18
19
|
|
19
20
|
require_relative 'freedcamp_api/list_lists'
|
20
21
|
|
22
|
+
require_relative 'freedcamp_api/list_milestones'
|
23
|
+
|
21
24
|
require_relative 'freedcamp_api/create_comment'
|
22
25
|
|
23
26
|
module Researchable
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: researchable-freedcamp-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Blaauw
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02-
|
11
|
+
date: 2022-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active_interaction
|