repltalk 4.2.0 → 4.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a53c13e1afa3b083432593518f24be2413de67b4ac7c9c3d0a325e118ce5a21b
4
- data.tar.gz: c3973f28be9f38c34c9fbab0b194bb9bc4c76dd8b6cea92f4fca6b135dd93656
3
+ metadata.gz: 229806852befc44d228b1cd9a9417c1a6db0aa57e7d009b73ed408a26eed66ca
4
+ data.tar.gz: dee45711ffa9ad54f90b2f6ecf001d4a4beb219c1e0639b1f91f90ad864841ec
5
5
  SHA512:
6
- metadata.gz: 838143889e780ba16a2701a3acaa108851f17f37dd806a1e75f9a078825e3851cfba69aae0ce43699d11d3bc0b5d0066ee3926f17b711c2e564eb3421ef64a44
7
- data.tar.gz: 2b41a5f852a0afdb1ac84b2fb6ee8c51b137ac945f93a670d9af3680d801ba68fcd4c3e3cf9d5a1724c40f33b5330a9f0d024d7ebcfc0126fc7a58fa0d9a015c
6
+ metadata.gz: 2564f4af626f4945445f5d04aeb1142d1ec8768c3227363c6f5e665dab073def8e085d8232c4164141cc2cb132a020ff0fa53279d2f5cfcff2d154be8875e749
7
+ data.tar.gz: 9bb9cea224e617a1c23b9db38de0954b98686213493b665442e5842784735d4c95a5032fcb05fc024c27a3dabbbdf0a12c0701c24a192fd5ecb112a3be934d4b
@@ -43,16 +43,6 @@ module ReplTalk
43
43
 
44
44
  TAG = "
45
45
  id
46
- replCount
47
- replsTaggedTodayCount
48
- creatorCount
49
- isTrending
50
- "
51
-
52
- REACTIONS = "
53
- id
54
- type
55
- count
56
46
  "
57
47
 
58
48
  REPL = "
@@ -70,9 +60,6 @@ module ReplTalk
70
60
  tags {
71
61
  #{TAG}
72
62
  }
73
- reactions {
74
- #{REACTIONS}
75
- }
76
63
  lang {
77
64
  #{LANGUAGE}
78
65
  }
@@ -501,18 +488,6 @@ module ReplTalk
501
488
  }
502
489
  "
503
490
 
504
- TOGGLE_REACTION = "
505
- mutation ReplViewReactionsToggleReactions($input: SetReplReactionInput!) {
506
- setReplReaction(input: $input) {
507
- ... on Repl {
508
- reactions {
509
- #{Fields::REACTIONS}
510
- }
511
- }
512
- }
513
- }
514
- "
515
-
516
491
  REPORT_POST = "
517
492
  mutation createBoardReport($id: Int!, $reason: String!) {
518
493
  createBoardReport(postId: $id, reason: $reason) {
@@ -55,16 +55,12 @@ module ReplTalk
55
55
 
56
56
 
57
57
  class Tag
58
- attr_reader :id, :repl_count, :creator_count, :is_trending, :repls_tagged_today_count
58
+ attr_reader :id
59
59
 
60
60
  def initialize(client, tag)
61
61
  @client = client
62
62
 
63
63
  @id = tag["id"]
64
- @repl_count = tag["replCount"]
65
- @is_trending = tag["isTrending"]
66
- @creator_count = tag["creatorCount"]
67
- @repls_tagged_today_count = tag["replsTaggedTodayCount"]
68
64
  end
69
65
 
70
66
  def get_repls(count: nil, after: nil)
@@ -85,24 +81,6 @@ module ReplTalk
85
81
 
86
82
 
87
83
 
88
-
89
- class Reaction
90
- attr_reader :id, :type, :count
91
-
92
- def initialize(reaction)
93
- @id = reaction["id"]
94
- @type = reaction["type"]
95
- @count = reaction["count"]
96
- end
97
-
98
- def to_s
99
- @type
100
- end
101
- end
102
-
103
-
104
-
105
-
106
84
  class ReplComment
107
85
  attr_reader :id, :content, :author, :repl, :replies
108
86
 
@@ -157,7 +135,7 @@ module ReplTalk
157
135
 
158
136
 
159
137
  class Repl
160
- attr_reader :id, :url, :title, :author, :description, :timestamp, :size, :run_count, :fork_count, :language, :img_url, :origin_url, :is_private, :is_always_on, :tags, :reactions
138
+ attr_reader :id, :url, :title, :author, :description, :timestamp, :size, :run_count, :fork_count, :language, :img_url, :origin_url, :is_private, :is_always_on, :tags
161
139
 
162
140
  def initialize(client, repl)
163
141
  @client = client
@@ -179,7 +157,6 @@ module ReplTalk
179
157
  @is_always_on = repl["isAlwaysOn"]
180
158
 
181
159
  @tags = repl["tags"].map { |tag| Tag.new(@client, tag) }
182
- @reactions = repl["reactions"].map { |reaction| Reaction.new(reaction) }
183
160
  end
184
161
 
185
162
  def get_forks(count: 100, after: nil)
@@ -396,7 +373,7 @@ module ReplTalk
396
373
  @content = post["body"]
397
374
  @preview = post["preview"]
398
375
 
399
- if @content == "" # new post type
376
+ if @content == "" && @repl != nil # new post type
400
377
  if post["replComment"].nil? # no post attached
401
378
  @url = @repl.url
402
379
  @title = @repl.title
data/lib/repltalk.rb CHANGED
@@ -4,5 +4,5 @@ require_relative "repltalk/structures"
4
4
 
5
5
  module ReplTalk
6
6
  $BASE_URL = "https://replit.com"
7
- VERSION = "4.2.0"
7
+ VERSION = "4.5.0"
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: repltalk
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0
4
+ version: 4.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - CodingCactus
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-01 00:00:00.000000000 Z
11
+ date: 2022-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http