repltalk 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/queries.rb +16 -0
- data/lib/repltalk.rb +20 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65d203ef3528fe101026800562c7f63088f16ce6e92fc90227bb023cb4d7301c
|
4
|
+
data.tar.gz: a26cbd197e3268b40375a8eb435593792b9cabcbf99f560e06a44b5b25af85f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d77c7ca647951ca694e23786038c1df339d946b80fe9dee70c3897d2c67a4e85616558e9ce941c107c24b49587d896b28553c211e78bd86d524d81aca335497
|
7
|
+
data.tar.gz: 85e91cdb4b8f7c72951e03dc6de860ac3179635298db19cb7d263256343b76796e3af03f2831f9c4f329c8a95549bc4750881a8bc99f66013b6c1614f2d3f21b
|
data/lib/queries.rb
CHANGED
@@ -386,4 +386,20 @@ class Mutations < Queries
|
|
386
386
|
}
|
387
387
|
}"
|
388
388
|
end
|
389
|
+
|
390
|
+
def Mutations.report_post
|
391
|
+
"mutation createBoardReport($id: Int!, $reason: String!) {
|
392
|
+
createBoardReport(postId: $id, reason: $reason) {
|
393
|
+
id
|
394
|
+
}
|
395
|
+
}"
|
396
|
+
end
|
397
|
+
|
398
|
+
def Mutations.report_comment
|
399
|
+
"mutation createBoardReport($id: Int!, $reason: String!) {
|
400
|
+
createBoardReport(commentId: $id, reason: $reason) {
|
401
|
+
id
|
402
|
+
}
|
403
|
+
}"
|
404
|
+
end
|
389
405
|
end
|
data/lib/repltalk.rb
CHANGED
@@ -242,6 +242,16 @@ class Comment
|
|
242
242
|
nil
|
243
243
|
end
|
244
244
|
|
245
|
+
def report(reason)
|
246
|
+
@client.graphql(
|
247
|
+
"createBoardReport",
|
248
|
+
Mutations.report_comment,
|
249
|
+
id: @id,
|
250
|
+
reason: reason
|
251
|
+
)
|
252
|
+
nil
|
253
|
+
end
|
254
|
+
|
245
255
|
def to_s
|
246
256
|
@content
|
247
257
|
end
|
@@ -340,6 +350,16 @@ class Post
|
|
340
350
|
nil
|
341
351
|
end
|
342
352
|
|
353
|
+
def report(reason)
|
354
|
+
@client.graphql(
|
355
|
+
"createBoardReport",
|
356
|
+
Mutations.report_post,
|
357
|
+
id: @id,
|
358
|
+
reason: reason
|
359
|
+
)
|
360
|
+
nil
|
361
|
+
end
|
362
|
+
|
343
363
|
def to_s
|
344
364
|
@title
|
345
365
|
end
|