nexus-invision 1.6.0 → 1.7.0

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: 4dfe908216cd6c5097306852f51e36e97e2f61ac0e84c6cc6675e3882d3f9ae9
4
- data.tar.gz: f4eb93a2e69ef9e3db92bf26be396a4af78ab1476e0bb2bd60b0252c0d5bd060
3
+ metadata.gz: dc3abfd481d2b5fdaa763ee984b827f3b09f9fc21ad027777b6c33967d5cd2c9
4
+ data.tar.gz: 666880edfe82f85580442a03516fe358739061414a84cbbeaeba7f187e872b8c
5
5
  SHA512:
6
- metadata.gz: 80e290bf0f4b831dccab40a49cb5bac753227b361ac5cda351f5f1639d046d74c9faca68e84a76b4258370ce559a75022a4d44e80e04ded4ab3bc1a436290f85
7
- data.tar.gz: 55b1795f58a87b3036336998bef703b26163e434ae4de055b6fcc397a566277e6a1c11160a032d91dc53c0bbf3e196bb1ae762b319cfd47751a17682ff559821
6
+ metadata.gz: cb4abb4a20ef8ffa74d0fa8f5e0f1733f7362792092bb40948c84d6c8b2e7e6606a0a1a3d207844c2ddf2278249ec694167c33d660cafb3f9afba77fa867442c
7
+ data.tar.gz: 119d8c6b8ee38f13bb151d04be07a69bd14e05c3f9f564ac2ccd2500b32184d4774834b0973e1144d4a1aa896d75b0673eab0e0e33cbba53e30818edb3948df9
@@ -13,6 +13,8 @@ require "nexus/invision/requests/edit_member"
13
13
  require "nexus/invision/requests/list_forum_topics"
14
14
  require "nexus/invision/requests/remove_member_from_secondary_group"
15
15
  require "nexus/invision/requests/edit_member_primary_group"
16
+ require "nexus/invision/requests/ensure_member"
17
+ require "nexus/invision/requests/unread_count"
16
18
  require "nexus/invision/resources/group"
17
19
  require "nexus/invision/resources/login_link"
18
20
  require "nexus/invision/resources/member"
@@ -21,6 +23,8 @@ require "nexus/invision/resources/post"
21
23
  require "nexus/invision/resources/topic"
22
24
  require "nexus/invision/resources/user"
23
25
  require "nexus/invision/resources/warning"
26
+ require "nexus/invision/resources/ensure_member"
27
+ require "nexus/invision/resources/unread_count"
24
28
  require "sorbet-runtime"
25
29
  require "uri"
26
30
 
@@ -151,6 +155,28 @@ module Nexus
151
155
  Resources::Member.from_hash(response.body)
152
156
  end
153
157
 
158
+ sig { params(request: Requests::EnsureMember).returns(Resources::EnsureMember) }
159
+ def ensure_member(request)
160
+ response = request(
161
+ http_method: HTTPMethod::GET,
162
+ endpoint: URI("core/ensuremember/#{request.id}"),
163
+ params: request.serialize,
164
+ )
165
+
166
+ Resources::EnsureMember.from_hash(response.body)
167
+ end
168
+
169
+ sig { params(request: Requests::UnreadCount).returns(Resources::UnreadCount) }
170
+ def unread_count(request)
171
+ response = request(
172
+ http_method: HTTPMethod::GET,
173
+ endpoint: URI("core/unreadcount/#{request.id}"),
174
+ params: request.serialize,
175
+ )
176
+
177
+ Resources::UnreadCount.from_hash(response.body)
178
+ end
179
+
154
180
  sig { params(request: Requests::EditMemberPrimaryGroup).returns(Resources::Member) }
155
181
  def edit_member_primary_group(request)
156
182
  response = request(
@@ -0,0 +1,19 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ require "nexus/invision/value_object"
5
+ require "sorbet-runtime"
6
+
7
+ module Nexus
8
+ module Invision
9
+ module Requests
10
+ class EnsureMember < T::Struct
11
+ include ValueObject
12
+
13
+ const :id, Integer
14
+ const :name, String
15
+ const :email, String
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,17 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ require "nexus/invision/value_object"
5
+ require "sorbet-runtime"
6
+
7
+ module Nexus
8
+ module Invision
9
+ module Requests
10
+ class UnreadCount < T::Struct
11
+ include ValueObject
12
+
13
+ const :id, Integer
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,18 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ require "nexus/invision/value_object"
5
+ require "sorbet-runtime"
6
+
7
+ module Nexus
8
+ module Invision
9
+ module Resources
10
+ class EnsureMember < T::Struct
11
+ include ValueObject
12
+
13
+ const :id, Integer
14
+ const :created, T::Boolean
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,17 @@
1
+ # typed: strict
2
+ # frozen_string_literal: true
3
+
4
+ require "nexus/invision/value_object"
5
+ require "sorbet-runtime"
6
+
7
+ module Nexus
8
+ module Invision
9
+ module Resources
10
+ class UnreadCount < T::Struct
11
+ include ValueObject
12
+
13
+ const :count, Integer
14
+ end
15
+ end
16
+ end
17
+ end
@@ -3,7 +3,7 @@
3
3
 
4
4
  module Nexus
5
5
  module Invision
6
- # Leave this as 1.6.0 in order for CI process to replace with the tagged version.
7
- VERSION = "1.6.0"
6
+ # Leave this as 1.7.0 in order for CI process to replace with the tagged version.
7
+ VERSION = "1.7.0"
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexus-invision
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Robertson
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-29 00:00:00.000000000 Z
11
+ date: 2024-02-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -33,14 +33,18 @@ files:
33
33
  - lib/nexus/invision/requests/delete_member.rb
34
34
  - lib/nexus/invision/requests/edit_member.rb
35
35
  - lib/nexus/invision/requests/edit_member_primary_group.rb
36
+ - lib/nexus/invision/requests/ensure_member.rb
36
37
  - lib/nexus/invision/requests/list_forum_topics.rb
37
38
  - lib/nexus/invision/requests/remove_member_from_secondary_group.rb
39
+ - lib/nexus/invision/requests/unread_count.rb
40
+ - lib/nexus/invision/resources/ensure_member.rb
38
41
  - lib/nexus/invision/resources/group.rb
39
42
  - lib/nexus/invision/resources/login_link.rb
40
43
  - lib/nexus/invision/resources/member.rb
41
44
  - lib/nexus/invision/resources/page.rb
42
45
  - lib/nexus/invision/resources/post.rb
43
46
  - lib/nexus/invision/resources/topic.rb
47
+ - lib/nexus/invision/resources/unread_count.rb
44
48
  - lib/nexus/invision/resources/user.rb
45
49
  - lib/nexus/invision/resources/warning.rb
46
50
  - lib/nexus/invision/value_object.rb
@@ -108,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
112
  - !ruby/object:Gem::Version
109
113
  version: '0'
110
114
  requirements: []
111
- rubygems_version: 3.5.5
115
+ rubygems_version: 3.5.6
112
116
  signing_key:
113
117
  specification_version: 4
114
118
  summary: A client for the Invision Community REST API.