From 83131ad36a4827503e3917ad46dd8f93afb3cef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabio=20Jos=C3=A9?= Date: Wed, 5 Dec 2018 22:52:54 -0200 Subject: [PATCH] All required and optional attributes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabio José --- lib/cloudevent.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/lib/cloudevent.js b/lib/cloudevent.js index e8acf5f..072e866 100644 --- a/lib/cloudevent.js +++ b/lib/cloudevent.js @@ -48,6 +48,26 @@ Cloudevent.prototype.time = function(_time){ return this; } +Cloudevent.prototype.schemaurl = function(_schemaurl) { + this.spec.schemaurl(_schemaurl); + return this; +} + +Cloudevent.prototype.contenttype = function(_contenttype){ + this.spec.contenttype(_contenttype); + return this; +} + +Cloudevent.prototype.data = function(_data) { + this.spec.data(_data); + return this; +} + +Cloudevent.prototype.addExtension = function(key, value){ + this.spec.addExtension(key, value); + return this; +} + /* * Export the specs */