repltalk 4.0.0 → 4.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dd7a674596285cb7f8a4d0c2f6a5a9a03629a128f103def8f25b8404c4a6dba5
4
- data.tar.gz: 53337d06dffe548294ffad1019dcb2c89e96f9d307d57d711fee8f29a6f75298
3
+ metadata.gz: ca32c6abe912a479dc7c61817f187201159673fbb1552709ba6ea2430d6eaa9c
4
+ data.tar.gz: 52227cb7b963b6c1a1f5398ce8352dd223c70dd1a0e089bf6f175fbe253fa6cb
5
5
  SHA512:
6
- metadata.gz: 9147b972df6cf7c7c204b748340ad45ddcca8f3d06f8438852625aba108707a6293d2afdcc7728ce3780475237783adb3d846c5802b3333266d9e09f47bb0c6c
7
- data.tar.gz: 9b11286a5337596e79c928a68af57519c65a9e700396be6869b777238f5b31a5bfa8db7cbf670d13ba5a131faf36897e65c943e15a17e8cc320bac626bec5740
6
+ metadata.gz: 2c02a0b643517276ecb60d843345dae996855ff0b726f576a824000b1cc21d16fb0d6522d56d87839c12730a488aa616dc1617bdee703d0a524d1b3f4d306abb
7
+ data.tar.gz: 98ada7dd72a0646fe6b4312a18b33ad71c36b45cc14f0e0c9bf13759d5cf0da079aa939481b8410c5aca599edc7fe07183aebbca90b26e9b643960a8a4b75119
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.0.0"
7
+ VERSION = "4.0.1"
8
8
  end
@@ -154,10 +154,11 @@ module ReplTalk
154
154
  r["featuredRepls"].map { |repl| Repl.new(self, repl) }
155
155
  end
156
156
 
157
- def get_trending_tags
157
+ def get_trending_tags(count: nil)
158
158
  t = graphql(
159
159
  "ExploreFeed",
160
- GQL::Queries::GET_TRENDING_TAGS
160
+ GQL::Queries::GET_TRENDING_TAGS,
161
+ count: count
161
162
  )
162
163
  t["trendingTagsFeed"]["initialTags"].map { |tag| Tag.new(self, tag) }
163
164
  end
@@ -380,17 +380,19 @@ module ReplTalk
380
380
  "
381
381
 
382
382
  GET_TRENDING_TAGS = "
383
- query ExploreTrendingRepls($tag: String!) {
384
- tag(id: $tag) {
385
- #{Fields::TAG}
383
+ query ExploreFeed($count: Int) {
384
+ trendingTagsFeed(initialTagsCount: $count) {
385
+ initialTags {
386
+ #{Fields::TAG}
387
+ }
386
388
  }
387
389
  }
388
390
  "
389
391
 
390
392
  GET_TAGS_REPLS = "
391
- query ExploreTrendingRepls($tag: String!, $after: String) {
393
+ query ExploreTrendingRepls($tag: String!, $count: Int, $after: String) {
392
394
  tag(id: $tag) {
393
- repls(after: $after) {
395
+ repls(limit: $count, after: $after) {
394
396
  items {
395
397
  #{Fields::REPL}
396
398
  }
@@ -87,11 +87,12 @@ module ReplTalk
87
87
  @repls_tagged_today_count = tag["replsTaggedTodayCount"]
88
88
  end
89
89
 
90
- def get_repls(after: nil)
90
+ def get_repls(count: nil, after: nil)
91
91
  r = @client.graphql(
92
92
  "ExploreTrendingRepls",
93
93
  GQL::Queries::GET_TAGS_REPLS,
94
94
  tag: @id,
95
+ count: count,
95
96
  after: after
96
97
  )
97
98
  r["tag"]["repls"]["items"].map { |repl| Repl.new(@client, 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.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - CodingCactus
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-08 00:00:00.000000000 Z
11
+ date: 2021-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http