Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: organize README badges and remove TS example #112

Merged
merged 2 commits into from
May 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 12 additions & 64 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,80 +1,25 @@
[![licence](https://img.shields.io/github/license/cloudevents/sdk-javascript)](http://www.apache.org/licenses/LICENSE-2.0)
# JavaScript SDK for CloudEvents

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/bd66e7c52002481993cd6d610534b0f7)](https://www.codacy.com/app/fabiojose/sdk-javascript?utm_source=github.com&utm_medium=referral&utm_content=cloudevents/sdk-javascript&utm_campaign=Badge_Grade)
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/bd66e7c52002481993cd6d610534b0f7)](https://www.codacy.com/app/fabiojose/sdk-javascript?utm_source=github.com&utm_medium=referral&utm_content=cloudevents/sdk-javascript&utm_campaign=Badge_Coverage)
[![Build Status](https://travis-ci.org/cloudevents/sdk-javascript.svg?branch=master)](https://travis-ci.org/cloudevents/sdk-javascript)
[![downloads](https://img.shields.io/npm/dy/cloudevents-sdk.svg)](https://www.npmjs.com/package/cloudevents-sdk)
[![npm version](https://img.shields.io/npm/v/cloudevents-sdk.svg)](https://www.npmjs.com/package/cloudevents-sdk)
[![dependencies](https://david-dm.org/cloudevents/sdk-javascript.svg)](https://david-dm.org/cloudevents/sdk-javascript)
[![vulnerabilities](https://snyk.io/test/github/cloudevents/sdk-javascript/badge.svg)](https://snyk.io/test/github/cloudevents/sdk-javascript)
[![licence](https://img.shields.io/github/license/cloudevents/sdk-javascript)](http://www.apache.org/licenses/LICENSE-2.0)

# sdk-javascript

Official CloudEvents' SDK for JavaScript.

<img src="https://github.com/cncf/artwork/blob/master/projects/cloudevents/horizontal/color/cloudevents-horizontal-color.png" width="300" height="58" alt="CloudEvents logo">
The CloudEvents SDK for JavaScript.

## Status

This SDK is still considered a work in progress, therefore things might (and
will) break with every update.
This SDK is still considered a work in progress.

This SDK current supports the following versions of CloudEvents:
- v1.0

**Checkout the [changelog](./CHANGELOG.md) to see what's going on!**

## Contributing

Before create an awesome PR, please read our [guidelines](./CONTRIBUTING.md).

## Examples

To see working examples, point to [examples](./examples).

## :newspaper: Newsletter :newspaper:

> all the API developed before, for 0.1 and 0.3, works as the same.

Checkout the new expressive additions.

### Use typed CloudEvents in your Typescript project

> There is full example: [typescript-ex](./examples/typescript-ex)

```ts
import CloudEvent, {
event,
StructuredHTTPEmitter,
BinaryHTTPEmitter,

StructuredHTTPReceiver,
BinaryHTTPReceiver
} from 'cloudevents-sdk/v1';

let myevent: CloudEvent = event()
.source('/source')
.type('type')
.dataContentType('text/plain')
.dataschema('http://d.schema.com/my.json')
.subject('cha.json')
.data('my-data')
.addExtension("my-ext", "0x600");

// . . .

```

## Versioning

### Before Spec reaches 1.0

- `0.x.p`: where `x` relates to spec version and `p` relates to fixes, releases
and breaking changes
- v1.0

### After Spec reaches 1.0

- `x.M.p`: where `x` relates to spec version, `M` relates to minor and `p` relates
to fixes. See [semver](https://semver.org/)
**Checkout the [changelog](CHANGELOG.md) to see what's going on!**

## Installation

Expand Down Expand Up @@ -109,8 +54,6 @@ These are the supported specifications by this version.

## How to use

> If you want old examples, they are [here](./OLDOCS.md)

### Usage

```js
Expand Down Expand Up @@ -331,6 +274,11 @@ Receiver.check(Object, Map)
CloudEvent Receiver.parse(Object, Map)
```

## Versioning

- `x.M.p`: where `x` relates to spec version, `M` relates to minor and `p` relates
to fixes. See [semver](https://semver.org/)

## Community

- There are bi-weekly calls immediately following the [Serverless/CloudEvents
Expand Down