From 441613b103e0cc2203e5220928b57c0630a329f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabio=20Jos=C3=A9?= Date: Tue, 11 Jun 2019 20:47:06 -0300 Subject: [PATCH] Document the parse method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabio José --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1fdb14f..4418c14 100644 --- a/README.md +++ b/README.md @@ -175,8 +175,7 @@ var config = { }; // The binding instance -var binding = Cloudevent - .bindings["http-structured0.2"](config); +var binding = new Cloudevent.bindings["http-structured0.2"](config); binding.receive() .then(cloudevent => { @@ -318,10 +317,15 @@ Binding(config) Binding.emit(cloudevent) /* - * Checks if some Object and a Map of attributes + * Checks if some Object and a Map of headers * follows the binding definition. Throw an error if did not follow */ Binding.check(Object, Map) + +/* + * Checks and parse the Binary as Cloudevent + */ +Cloudevent Binding.parse(Object, Map) ``` #### Receiver Binding