researchable-freedcamp-api 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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ad49b10c4da65d1a26113907ba125c2028abe47fef02f1f81c7e10d8f3f988a
|
4
|
+
data.tar.gz: bdff27b7cc946fbe620ecaced671ced639e30c805ddcc463cd06026709971111
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4547b1347784513899432b34aee63de5bce20f8922e32c6f9b151b3c36a4bd3f10092a00f77b7f33b94d9c266879f38336bf04587964689d5324b4285606c7f6
|
7
|
+
data.tar.gz: dce7e0ae7cd0a45c2f72168dea410a3c47a1b516ea5b4882eeb2ed36116c8163cd999e4dcf0083737bbbf9d91cd5146fd5cc4db579844fb24202d6bcbef28d00
|
data/.gitignore
CHANGED
@@ -0,0 +1,24 @@
|
|
1
|
+
# typed: sigil
|
2
|
+
|
3
|
+
module Researchable
|
4
|
+
module FreedcampApi
|
5
|
+
# @api private
|
6
|
+
class CreateComment < Endpoint
|
7
|
+
object :comment, class: Researchable::FreedcampApi::Structs::Comment
|
8
|
+
def execute
|
9
|
+
create_comment(comment)
|
10
|
+
end
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
sig do
|
15
|
+
params(comment: Researchable::FreedcampApi::Structs::Comment)
|
16
|
+
.returns(T::Hash[T.untyped, T.untyped])
|
17
|
+
end
|
18
|
+
def create_comment(comment)
|
19
|
+
# title
|
20
|
+
session.post('/comments', comment)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# require 'sorbet-runtime'
|
3
|
+
|
4
|
+
# (1) Create a new class that subclasses `T::Struct`
|
5
|
+
module Researchable
|
6
|
+
module FreedcampApi
|
7
|
+
module Structs
|
8
|
+
class Comment < T::Struct
|
9
|
+
# Item id to add a comment for
|
10
|
+
const :item_id, T.nilable(String)
|
11
|
+
# Application id (wiki). Supported apps are
|
12
|
+
# - (2) APP_TODOS,
|
13
|
+
# - (6) APP_FILES,
|
14
|
+
# - 3 APP_DISCUSSIONS,
|
15
|
+
# - 13 APP_BUGTRACKER,
|
16
|
+
# - 14 APP_WIKI, A
|
17
|
+
# - 19 APP_CALENDAR.
|
18
|
+
# (see https://freedcamp.com/Mobile_7Yh/iOS_application_6zp/wiki/wiki_public/view/AHaab)
|
19
|
+
const :app_id, T.nilable(String)
|
20
|
+
# Description of the comment
|
21
|
+
const :description, T.nilable(String)
|
22
|
+
# Files that might be attached
|
23
|
+
const :attached_ids, T.nilable(T::Array[Integer])
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
spec.description = 'Wrapper around the freedcamp api'
|
12
12
|
spec.homepage = 'https://researchable.nl'
|
13
13
|
spec.license = 'MIT'
|
14
|
-
spec.required_ruby_version = Gem::Requirement.new('>= 2.
|
14
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.7.0')
|
15
15
|
|
16
16
|
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
17
17
|
|
@@ -35,10 +35,10 @@ Gem::Specification.new do |spec|
|
|
35
35
|
# guide at: https://bundler.io/guides/creating_gem.html
|
36
36
|
spec.add_dependency 'active_interaction', '>= 3.2'
|
37
37
|
spec.add_dependency 'httparty', '>= 0.14'
|
38
|
-
spec.add_dependency 'sorbet-runtime'
|
38
|
+
spec.add_dependency 'sorbet-runtime'
|
39
39
|
|
40
40
|
spec.add_development_dependency 'bundler', '>0'
|
41
|
+
spec.add_development_dependency 'byebug'
|
41
42
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
42
43
|
spec.add_development_dependency 'sorbet'
|
43
|
-
spec.add_development_dependency 'byebug'
|
44
44
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frank Blaauw
|
@@ -67,35 +67,35 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: byebug
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: rspec
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
89
|
+
version: '3.0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
96
|
+
version: '3.0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: sorbet
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - ">="
|
@@ -126,6 +126,7 @@ files:
|
|
126
126
|
- bin/setup
|
127
127
|
- lib/researchable-freedcamp-api.rb
|
128
128
|
- lib/researchable/freedcamp_api.rb
|
129
|
+
- lib/researchable/freedcamp_api/create_comment.rb
|
129
130
|
- lib/researchable/freedcamp_api/create_task.rb
|
130
131
|
- lib/researchable/freedcamp_api/endpoint.rb
|
131
132
|
- lib/researchable/freedcamp_api/list_milestones.rb
|
@@ -135,6 +136,7 @@ files:
|
|
135
136
|
- lib/researchable/freedcamp_api/sessions/session.rb
|
136
137
|
- lib/researchable/freedcamp_api/sessions/signed_session.rb
|
137
138
|
- lib/researchable/freedcamp_api/structs.rb
|
139
|
+
- lib/researchable/freedcamp_api/structs/comment.rb
|
138
140
|
- lib/researchable/freedcamp_api/structs/signature.rb
|
139
141
|
- lib/researchable/freedcamp_api/structs/task.rb
|
140
142
|
- lib/researchable/freedcamp_api/update_task.rb
|
@@ -184,7 +186,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
184
186
|
requirements:
|
185
187
|
- - ">="
|
186
188
|
- !ruby/object:Gem::Version
|
187
|
-
version: 2.
|
189
|
+
version: 2.7.0
|
188
190
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
189
191
|
requirements:
|
190
192
|
- - ">="
|