diff --git a/lib/cloudevent.js b/lib/cloudevent.js index d86ca3a..4f05de3 100644 --- a/lib/cloudevent.js +++ b/lib/cloudevent.js @@ -43,6 +43,10 @@ Cloudevent.prototype.getType = function() { return this.spec.getType(); }; +Cloudevent.prototype.specversion = function(version) { + return this.spec.specversion(version); +}; + Cloudevent.prototype.getSpecversion = function() { return this.spec.getSpecversion(); }; diff --git a/lib/specs/spec_0_2.js b/lib/specs/spec_0_2.js index 489af96..dfef99c 100644 --- a/lib/specs/spec_0_2.js +++ b/lib/specs/spec_0_2.js @@ -53,6 +53,11 @@ Spec02.prototype.getType = function(){ return this.payload["type"]; }; +Spec02.prototype.specversion = function(_specversion){ + // does not set! This is right + return this; +}; + Spec02.prototype.getSpecversion = function() { return this.payload["specversion"]; };