opportunity: Added Makefile and README
[nit.git] / lib / github_api.nit
index b0240ca..2394592 100644 (file)
@@ -17,7 +17,7 @@
 module github_api
 
 import curl
-import simple_json_reader
+import json::static
 
 # Specific Curl that know hot to talk to the github API
 class GithubCurl
@@ -56,7 +56,7 @@ class GithubCurl
                        var obj = response.body_str.json_to_nit_object
                        if obj isa HashMap[String, nullable Object] then
                                if obj.keys.has("message") then
-                                       print "Message from Github API: {obj["message"]}"
+                                       print "Message from Github API: {obj["message"] or else ""}"
                                        print "Requested URI: {uri}"
                                        abort
                                end