nexus-invision 1.7.0 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nexus/invision/client.rb +11 -2
- data/lib/nexus/invision/requests/create_message.rb +31 -0
- data/lib/nexus/invision/version.rb +2 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e12876cd9dc6575ac0a9381681df61604e7c0be30913ad9f0fef3d449342bd21
|
4
|
+
data.tar.gz: 6bdb6bd9fd8fa1f2d0feeb37f378d9bd16fe6aa714ed00fd00ae908a47c9cc49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8afae523606c24163b2a0f280dc5271da534512e1b5ba7f3d403b73406dd346fd0133164a6c6928536d17e2c4c21a9c24392b4d049654ab167bfd1faa0c7e18
|
7
|
+
data.tar.gz: bc0cfc1b124b1601f4e35423e3749e6a9d6ab2bd2a74c09a0af503c48890de8f6dc6dfce9cb4391994a2567a7e862e9ce7aaf00dcf7551a03eb347a64e298131
|
@@ -8,6 +8,7 @@ require "nexus/invision/requests/add_member_to_secondary_group"
|
|
8
8
|
require "nexus/invision/requests/create_forum_post"
|
9
9
|
require "nexus/invision/requests/create_forum_topic"
|
10
10
|
require "nexus/invision/requests/create_member_warning"
|
11
|
+
require "nexus/invision/requests/create_message"
|
11
12
|
require "nexus/invision/requests/delete_member"
|
12
13
|
require "nexus/invision/requests/edit_member"
|
13
14
|
require "nexus/invision/requests/list_forum_topics"
|
@@ -160,18 +161,26 @@ module Nexus
|
|
160
161
|
response = request(
|
161
162
|
http_method: HTTPMethod::GET,
|
162
163
|
endpoint: URI("core/ensuremember/#{request.id}"),
|
163
|
-
params: request.serialize,
|
164
|
+
params: request.serialize.except("id"),
|
164
165
|
)
|
165
166
|
|
166
167
|
Resources::EnsureMember.from_hash(response.body)
|
167
168
|
end
|
168
169
|
|
170
|
+
sig { params(request: Requests::CreateMessage).void }
|
171
|
+
def create_message(request)
|
172
|
+
request(
|
173
|
+
http_method: HTTPMethod::POST,
|
174
|
+
endpoint: URI("core/messages"),
|
175
|
+
params: request.serialize,
|
176
|
+
)
|
177
|
+
end
|
178
|
+
|
169
179
|
sig { params(request: Requests::UnreadCount).returns(Resources::UnreadCount) }
|
170
180
|
def unread_count(request)
|
171
181
|
response = request(
|
172
182
|
http_method: HTTPMethod::GET,
|
173
183
|
endpoint: URI("core/unreadcount/#{request.id}"),
|
174
|
-
params: request.serialize,
|
175
184
|
)
|
176
185
|
|
177
186
|
Resources::UnreadCount.from_hash(response.body)
|
@@ -0,0 +1,31 @@
|
|
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 CreateMessage < T::Struct
|
11
|
+
extend T::Sig
|
12
|
+
include ValueObject
|
13
|
+
|
14
|
+
const :from, Integer
|
15
|
+
const :to, T::Array[Integer]
|
16
|
+
const :title, String
|
17
|
+
const :body, String
|
18
|
+
|
19
|
+
sig { override.returns(T::Hash[String, T.untyped]) }
|
20
|
+
def serialize
|
21
|
+
{
|
22
|
+
"from" => @from,
|
23
|
+
"to" => @to.map(&:to_s).join(","),
|
24
|
+
"title" => @title,
|
25
|
+
"body" => @body,
|
26
|
+
}
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
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.
|
4
|
+
version: 1.8.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-02-
|
11
|
+
date: 2024-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -30,6 +30,7 @@ files:
|
|
30
30
|
- lib/nexus/invision/requests/create_forum_post.rb
|
31
31
|
- lib/nexus/invision/requests/create_forum_topic.rb
|
32
32
|
- lib/nexus/invision/requests/create_member_warning.rb
|
33
|
+
- lib/nexus/invision/requests/create_message.rb
|
33
34
|
- lib/nexus/invision/requests/delete_member.rb
|
34
35
|
- lib/nexus/invision/requests/edit_member.rb
|
35
36
|
- lib/nexus/invision/requests/edit_member_primary_group.rb
|