@@ -5,7 +5,7 @@ Javascript SDK for CloudEvents
5
5
6
6
> This is a WIP
7
7
8
- # Repository Structure
8
+ ## Repository Structure
9
9
10
10
``` text
11
11
├── index.js
@@ -52,7 +52,7 @@ Javascript SDK for CloudEvents
52
52
53
53
* ` test/cloudevent_spec_0_2.js ` : unit testing for spec 0.2
54
54
55
- # Unit Testing
55
+ ## Unit Testing
56
56
57
57
The unit test checks the result of formatted payload and the constraints.
58
58
@@ -62,9 +62,9 @@ npm test
62
62
63
63
```
64
64
65
- # The API
65
+ ## The API
66
66
67
- ## ` Cloudevent ` class
67
+ ### ` Cloudevent ` class
68
68
69
69
``` js
70
70
@@ -80,7 +80,7 @@ String Cloudevent.toString()
80
80
81
81
```
82
82
83
- ## ` Formatter ` classes
83
+ ### ` Formatter ` classes
84
84
85
85
Every formatter class must implement these methods to work properly.
86
86
@@ -115,7 +115,7 @@ Spec(Cloudevent)
115
115
Spec .check ()
116
116
117
117
```
118
- ## ` Binding ` classes
118
+ ### ` Binding ` classes
119
119
120
120
Every Binding class must implement these methods to work properly.
121
121
@@ -133,7 +133,7 @@ Binding.emit(cloudevent)
133
133
134
134
```
135
135
136
- # How to use
136
+ ## How to use
137
137
138
138
The ` Cloudevent ` constructor arguments.
139
139
@@ -147,7 +147,7 @@ Cloudevent(spec, format);
147
147
148
148
```
149
149
150
- ## How to construct instances?
150
+ ### How to construct instances?
151
151
152
152
``` js
153
153
/*
@@ -186,7 +186,7 @@ cloudevent02
186
186
187
187
```
188
188
189
- ## How to get the formatted payload?
189
+ ### How to get the formatted payload?
190
190
191
191
``` js
192
192
var cloudevent = new Cloudevent ()
@@ -200,7 +200,7 @@ var formatted = cloudevent.format();
200
200
201
201
```
202
202
203
- ## How to emit an event?
203
+ ### How to emit an event?
204
204
205
205
``` js
206
206
// The event
0 commit comments