repltalk 4.1.0 → 4.1.1
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/repltalk/graphql.rb +3 -0
- data/lib/repltalk/structures.rb +8 -2
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b84d171f11260c6228c57a98ecafa820de55beee7e3b2b6a6a073c8d1f098e2d
|
|
4
|
+
data.tar.gz: 5308bbf0fe4421b85445e3d30166073508fe6a51298e862844d33bc876323c03
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e6233c13df87432bd1465da62193bc46d1b3ba7305ada0974693d88548ccd681af160f3ea82ea1384264434f185ca2364f2bf3de186dbcf9b44dd29d39c5324e
|
|
7
|
+
data.tar.gz: cc1d0293a530e7baaae7a3c1bbbe89296b2193fdad2c4097889dd25b96b641e218428db86672de0552cd17acb02420832d40285d0076080b45fbe97c3e4ffef3
|
data/lib/repltalk/graphql.rb
CHANGED
data/lib/repltalk/structures.rb
CHANGED
|
@@ -380,15 +380,21 @@ module ReplTalk
|
|
|
380
380
|
class Post
|
|
381
381
|
attr_reader :id, :url, :repl, :board, :title, :author, :answer, :content, :preview, :timestamp, :vote_count, :comment_count, :can_vote, :has_voted, :is_answered, :is_answerable, :is_hidden, :is_pinned, :is_locked, :is_announcement
|
|
382
382
|
|
|
383
|
-
def initialize(client, post)
|
|
383
|
+
def initialize(client, post)
|
|
384
384
|
@client = client
|
|
385
385
|
|
|
386
386
|
@id = post["id"]
|
|
387
387
|
@url = $BASE_URL + post["url"]
|
|
388
388
|
@title = post["title"]
|
|
389
|
+
@timestamp = post["timeCreated"]
|
|
390
|
+
|
|
389
391
|
@content = post["body"]
|
|
390
392
|
@preview = post["preview"]
|
|
391
|
-
|
|
393
|
+
|
|
394
|
+
if @content == ""
|
|
395
|
+
@content = post["replComment"]["body"]
|
|
396
|
+
@preview = @content.length > 150 ? @content[0..150] : @content
|
|
397
|
+
end
|
|
392
398
|
|
|
393
399
|
@board = Board.new(post["board"])
|
|
394
400
|
@repl = post["repl"] == nil ? nil : Repl.new(@client, post["repl"])
|
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.1.
|
|
4
|
+
version: 4.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- CodingCactus
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-01-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: http
|