From 7a263a7f4d4705524d17b2b40294050b75112ed1 Mon Sep 17 00:00:00 2001 From: Alexandre Terrasa Date: Tue, 3 Feb 2015 22:25:41 +0100 Subject: [PATCH] github/api: move `html_url` to GithubEntity since it's shared by all of them Signed-off-by: Alexandre Terrasa --- lib/github/api.nit | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/github/api.nit b/lib/github/api.nit index ba8943e..25f17a9 100644 --- a/lib/github/api.nit +++ b/lib/github/api.nit @@ -344,6 +344,9 @@ abstract class GithubEntity end redef fun to_s do return json.to_json + + # Github page url. + fun html_url: String do return json["html_url"].to_s end # A Github user. @@ -365,9 +368,6 @@ class User self.json = json end - # Github User page url. - fun html_url: String do return json["html_url"].to_s - # Avatar image url for this user. fun avatar_url: String do return json["avatar_url"].to_s end @@ -394,9 +394,6 @@ class Repo # Repo short name on Github. fun name: String do return json["name"].to_s - # Github User page url. - fun html_url: String do return json["html_url"].to_s - # Get the repo owner. fun owner: User do return new User.from_json(api, json["owner"].as(JsonObject)) -- 1.7.9.5