repltalk 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/repltalk.rb +2 -2
- data/lib/repltalk/client.rb +1 -1
- data/lib/repltalk/graphql.rb +5 -15
- data/lib/repltalk/structures.rb +1 -19
- 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: 5147f5ae7c30e13587c24a08f5215c17f0fbc9dd0963fa2c4f8a4e86cf0118eb
|
4
|
+
data.tar.gz: a7d97f153947b85650a9642848b3990ec561c243985c02afee915f63f7d5ef38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de64c303910bf6e93f5969107728801d2d00317ce051561d2bd2ac6ccad92ecd49a68d6b35a20f766faead8c0126c843d8fe0d6878c8b9df5b57189808ce2b84
|
7
|
+
data.tar.gz: 1d153f24ceccc17deeb89c90648133bfb6a66fe4fc5e495827fd1583ecb5f1534cefcdc5d0ab9873526fe6c191ac14a2e7fab7737a4cc5e3cbdd299db287cd0a
|
data/lib/repltalk.rb
CHANGED
data/lib/repltalk/client.rb
CHANGED
data/lib/repltalk/graphql.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module ReplTalk
|
2
|
-
|
3
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
461
|
+
end
|
472
462
|
end
|
data/lib/repltalk/structures.rb
CHANGED
@@ -2,7 +2,7 @@ require "http"
|
|
2
2
|
require "json"
|
3
3
|
|
4
4
|
module ReplTalk
|
5
|
-
|
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.
|
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-
|
11
|
+
date: 2021-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|