repltalk 3.0.0 → 3.1.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: b29fd09750ab59ab7fea6a85c0e8e4d1c92e92384345a8eae78bc9bf66ba04cc
4
- data.tar.gz: 450fe16b28f0472b7b6a1dba9c7c352ce60e8905ad47a4606b0d56d0e247fddd
3
+ metadata.gz: 5147f5ae7c30e13587c24a08f5215c17f0fbc9dd0963fa2c4f8a4e86cf0118eb
4
+ data.tar.gz: a7d97f153947b85650a9642848b3990ec561c243985c02afee915f63f7d5ef38
5
5
  SHA512:
6
- metadata.gz: e384d3d6e95b775ab7ca7325f79397b0bce57cbaa88d0d756064f99787ed5221ab6ac508754ead20d9761fd53e4e5e26e0eddb83e598a418fce96618a4b8ffc4
7
- data.tar.gz: 0af84b33627e30b00cb0f27f776331221ec5bac5e5034746625a7dd31d55b31cb31b4787e71277a75f72b20a105500fcacb86bcf6e88ea5e11a00227d3085899
6
+ metadata.gz: de64c303910bf6e93f5969107728801d2d00317ce051561d2bd2ac6ccad92ecd49a68d6b35a20f766faead8c0126c843d8fe0d6878c8b9df5b57189808ce2b84
7
+ data.tar.gz: 1d153f24ceccc17deeb89c90648133bfb6a66fe4fc5e495827fd1583ecb5f1534cefcdc5d0ab9873526fe6c191ac14a2e7fab7737a4cc5e3cbdd299db287cd0a
data/lib/repltalk.rb CHANGED
@@ -3,6 +3,6 @@ require_relative "repltalk/graphql"
3
3
  require_relative "repltalk/structures"
4
4
 
5
5
  module ReplTalk
6
- $BASE_URL = "https://repl.it"
7
- VERSION = "3.0.0"
6
+ $BASE_URL = "https://repl.it"
7
+ VERSION = "3.1.0"
8
8
  end
@@ -2,7 +2,7 @@ require "http"
2
2
  require "json"
3
3
 
4
4
  module ReplTalk
5
- class Client
5
+ class Client
6
6
  attr_writer :sid
7
7
 
8
8
  def initialize(sid=nil)
@@ -1,6 +1,6 @@
1
1
  module ReplTalk
2
- module GQL
3
- module Fields
2
+ module GQL
3
+ module Fields
4
4
  ROLES = "
5
5
  id
6
6
  name
@@ -18,13 +18,6 @@ module ReplTalk
18
18
  timeCreated
19
19
  "
20
20
 
21
- SUBSCRIPTION = "
22
- id
23
- planId
24
- quantity
25
- timeCreated
26
- "
27
-
28
21
  LANGUAGE = "
29
22
  id
30
23
  key
@@ -56,9 +49,6 @@ module ReplTalk
56
49
  organization {
57
50
  #{ORGANIZATION}
58
51
  }
59
- subscription {
60
- #{SUBSCRIPTION}
61
- }
62
52
  languages {
63
53
  #{LANGUAGE}
64
54
  }
@@ -147,7 +137,7 @@ module ReplTalk
147
137
  end
148
138
 
149
139
 
150
- module Queries
140
+ module Queries
151
141
  GET_USER = "
152
142
  query userByUsername($username: String!) {
153
143
  user: userByUsername(username: $username) {
@@ -353,7 +343,7 @@ module ReplTalk
353
343
  end
354
344
 
355
345
 
356
- module Mutations
346
+ module Mutations
357
347
  include Fields
358
348
 
359
349
  CREATE_POST = "
@@ -468,5 +458,5 @@ module ReplTalk
468
458
  }
469
459
  "
470
460
  end
471
- end
461
+ end
472
462
  end
@@ -2,7 +2,7 @@ require "http"
2
2
  require "json"
3
3
 
4
4
  module ReplTalk
5
- class Role
5
+ class Role
6
6
  attr_reader :name, :key, :tagline
7
7
 
8
8
  def initialize(role)
@@ -38,23 +38,6 @@ module ReplTalk
38
38
 
39
39
 
40
40
 
41
- class Subscription
42
- attr_reader :id, :plan_id, :quantity, :timestamp
43
-
44
- def initialize(subscription)
45
- @id = subscription["id"]
46
- @plan_id = subscription["planId"]
47
- @quantity = subscription["quantity"]
48
- @timestamp = subscription["timeCreated"]
49
- end
50
-
51
- def to_s
52
- @plan_id
53
- end
54
- end
55
-
56
-
57
-
58
41
  class Language
59
42
  attr_reader :id, :key, :name, :tagline, :icon, :category
60
43
 
@@ -426,7 +409,6 @@ module ReplTalk
426
409
  @cycles = user["karma"]
427
410
  @is_hacker = user["isHacker"]
428
411
  @timestamp = user["timeCreated"]
429
- @subscription = user["subscription"] == nil ? nil : Subscription.new(user["subscription"])
430
412
  @roles = user["roles"].map { |role| Role.new(role) }
431
413
  @organization = user["organization"] == nil ? nil : Organization.new(user["organization"])
432
414
  @languages = user["languages"].map { |lang| Language.new(lang) }
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: 3.0.0
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - CodingCactus
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-12 00:00:00.000000000 Z
11
+ date: 2021-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http