github: save Github events ids.
authorAlexandre Terrasa <alexandre@moz-code.org>
Sun, 29 Nov 2015 09:00:18 +0000 (04:00 -0500)
committerAlexandre Terrasa <alexandre@moz-code.org>
Sun, 29 Nov 2015 20:32:11 +0000 (15:32 -0500)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

lib/github/api.nit
lib/github/events.nit

index 91cc006..18880ec 100644 (file)
@@ -732,6 +732,12 @@ class Issue
                super
        end
 
+       # Issue id.
+       fun id: Int do return json["id"].as(Int)
+
+       # Set issue id.
+       fun id=(id: Int) do json["id"] = id
+
        # Issue title.
        fun title: String do return json["title"].as(String)
 
index df7c8c3..543a786 100644 (file)
@@ -38,6 +38,12 @@ class GithubEvent
                self.json = json
        end
 
+       # Event ID from Github.
+       fun id: String do return json["id"].as(String)
+
+       # Set id.
+       fun id=(id: String) do json["id"] = id
+
        # Action performed by the event.
        fun action: String do return json["action"].as(String)