We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2527331 commit dba0dbbCopy full SHA for dba0dbb
src/RP42.cr
@@ -15,9 +15,7 @@ module RP42
15
http_client = HTTP::Client.new("api.intra.42.fr", tls: OpenSSL::SSL::Context::Client.insecure)
16
access_token.authenticate(http_client)
17
18
- coas : JSON::Any = JSON.parse(http_client.get("/v2/users/#{username}/coalitions").body)
19
- coa = coas[0]["name"].to_s
20
- coa = coas[1]["name"].to_s if coas.size > 1
+ coa = JSON.parse(http_client.get("/v2/users/#{username}/coalitions").body).as_a.last["name"].to_s
21
lvl = JSON.parse(http_client.get("/v2/users/#{username}").body)["cursus_users"][0]["level"].to_s
22
23
rich_client = RichCrystal::Client.new(531103976029028367_u64)
0 commit comments