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: 8548577689d043fe6092a9e0ae799567f47d84e0c6e69328c60672d55c4c5572
4
- data.tar.gz: 6862254a6953128dd131af3e79b30c3db0c7f2b653030dbbcf68ef5322b0df47
3
+ metadata.gz: 11f12801b1a72e9d12e6b00df889dcc75a94b1a4575faa8b50ec2930165ee1e6
4
+ data.tar.gz: 0bfd8c06d163eb9e5a4c822ad6dde5d06128ef76ec7b311cdbc0958c716a6331
5
5
  SHA512:
6
- metadata.gz: 3b8f801e3292b50c989717d5b7306afc4ccafac6901c2f0bdc0ddce5591ab4e592ee394e6f06ffada6107d498cb1ecfb0d0271c45770ce993d6c91138a3857be
7
- data.tar.gz: c47b871a253656a2d3e78e819d279f3a66a616bfac2afa1e5034acb98b4547da052003184322e92d4436bc22429479a109252c9fad119f9606423fcb7061eba2
6
+ metadata.gz: 0c80ecb8f21cc98e516c2df31be6183cfb317f732a6ce711ac286118e092b7b1083795bafdcd203494489e3b08c0828c94386bbfd20fd6b982bfbae95ce3f451
7
+ data.tar.gz: 155b549f426c4fce1e0f2d56208361f5488082a6b3d07196b169a8ad09ec7c79aa51c357fae40abd9b41d0e65aedb5db761572ce739477a08231432442ef0e4e
@@ -1 +1,34 @@
1
- # typed: strict
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
@@ -3,6 +3,6 @@
3
3
 
4
4
  module Researchable
5
5
  module FreedcampApi
6
- VERSION = "0.1.6"
6
+ VERSION = "0.1.7"
7
7
  end
8
8
  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.6
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-16 00:00:00.000000000 Z
11
+ date: 2022-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_interaction