From 903891e3d982ec726704f2abf2bc85cc53ac9a22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabio=20Jos=C3=A9?= Date: Wed, 14 Nov 2018 22:03:01 -0200 Subject: [PATCH] id and time attributes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabio José --- lib/cloudevent.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/cloudevent.js b/lib/cloudevent.js index 1c7e573..e8acf5f 100644 --- a/lib/cloudevent.js +++ b/lib/cloudevent.js @@ -38,6 +38,16 @@ Cloudevent.prototype.source = function(_source){ return this; } +Cloudevent.prototype.id = function(_id){ + this.spec.id(_id); + return this; +} + +Cloudevent.prototype.time = function(_time){ + this.spec.time(_time); + return this; +} + /* * Export the specs */