repltalk 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/queries.rb +16 -0
  3. data/lib/repltalk.rb +20 -0
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ade4342442037dfec06df6d42dc4fb825aa0ae28020a9a65a8cc6072ff1d5a83
4
- data.tar.gz: eabb22b821d0170bbec6a1cdcf1a9b8ab877d7cf5c746796ed56d098fa07b23f
3
+ metadata.gz: 65d203ef3528fe101026800562c7f63088f16ce6e92fc90227bb023cb4d7301c
4
+ data.tar.gz: a26cbd197e3268b40375a8eb435593792b9cabcbf99f560e06a44b5b25af85f8
5
5
  SHA512:
6
- metadata.gz: 8e1d95df4fa09ec118ee4d82115652831fded6cb0b9b55b09045d68f7ff0cc48c975a28de0b6e207de5d786c8ebc3f1482cdf4225b80f06baf407074e10b264c
7
- data.tar.gz: fc16a9bccab5cca65fa7041b9dce1720198d686582a47beb64310c0b6eb3d5e5359685bfbdd5120366d3df797608468e11040b9d5fce1cdaa32d98dd126ad7c7
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: repltalk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - CodingCactus