Merge: mongo: More queries
[nit.git] / lib / github / api.nit
index 7c85422..1a9ed1a 100644 (file)
@@ -20,7 +20,7 @@
 module api
 
 import github_curl
-intrude import json::serialization
+intrude import json::serialization_read
 
 # Client to Github API
 #
@@ -466,7 +466,7 @@ class GithubAPI
        #     assert repo != null
        #     var comment = api.load_commit_comment(repo, 8982707)
        #     assert comment.user.login == "Morriar"
-       #     assert comment.body == "For testing purposes..."
+       #     assert comment.body == "For testing purposes...\n"
        #     assert comment.commit_id == "7eacb86d1e24b7e72bc9ac869bf7182c0300ceca"
        fun load_commit_comment(repo: Repo, id: Int): nullable CommitComment do
                return load_from_github("/repos/{repo.full_name}/comments/{id}").as(nullable CommitComment)
@@ -512,8 +512,6 @@ abstract class GithubEntity
 
        # Github page url.
        var html_url: nullable String is writable
-
-       redef fun to_json do return serialize_to_json
 end
 
 # A Github user
@@ -529,6 +527,15 @@ class User
 
        # Avatar image url for this user.
        var avatar_url: nullable String is writable
+
+       # User public name if any.
+       var name: nullable String is writable
+
+       # User public email if any.
+       var email: nullable String is writable
+
+       # User public blog if any.
+       var blog: nullable String is writable
 end
 
 # A Github repository.
@@ -1062,8 +1069,6 @@ end
 redef class ISODate
        super Jsonable
        serialize
-
-       redef fun to_json do return serialize_to_json
 end
 
 # JsonDeserializer specific for Github objects.