readme: add information section
[nit.git] / lib / github / events.nit
index df7c8c3..33c637f 100644 (file)
@@ -34,10 +34,16 @@ class GithubEvent
 
        # Init `self` from a `json` object.
        init from_json(api: GithubAPI, json: JsonObject) do
-               self.api = api
+               init(api)
                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)