update readme

This commit is contained in:
Bevan Hunt 2020-01-07 13:21:38 -08:00
parent fde8ee56fd
commit cc642bd8b6
3 changed files with 11 additions and 11 deletions

2
Cargo.lock generated
View File

@ -386,7 +386,7 @@ dependencies = [
[[package]]
name = "broker"
version = "0.7.0"
version = "0.7.1"
dependencies = [
"actix-cors 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"actix-rt 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",

View File

@ -1,6 +1,6 @@
[package]
name = "broker"
version = "0.7.0"
version = "0.7.1"
authors = ["Bevan Hunt <bevan@bevanhunt.com>"]
edition = "2018"
license = "MIT"

View File

@ -27,7 +27,7 @@ The side-effect of this system is that the latest event is the schema. Old event
##### Step 1 - create a user
```html
/users
POST /users
```
- public endpoint
- POST JSON to create a user
@ -45,7 +45,7 @@ will return
##### Step 2 - login with the user
```html
/login
POST /login
```
- public endpoint
- POST JSON to login
@ -63,15 +63,15 @@ will return
##### Step 3 - insert an event
```html
/events
GET /events
```
- public endpoint
- connect your sse-client to this endpoint
```html
/insert
POST /insert
```
- authenticated endpoint
- authenticated endpoint (Authorization: Bearer {jwt})
- POST JSON to insert an event
```json
{"event":{...}, "collection_id":{...}, "timestamp":{...}, "data":{...}}
@ -87,15 +87,15 @@ will return
##### Optional Endpoints
```html
/events/collections/{collection_id}
GET /events/collections/{collection_id}
```
- authenticated endpoint
- authenticated endpoint (Authorization: Bearer {jwt})
- do a GET request where {collection_id} is the uuid of the collection you want (sorted by ascending timestamp)
```html
/events/{id}/cancel
GET /events/{id}/cancel
```
- authenticated endpoint
- authenticated endpoint (Authorization: Bearer {jwt})
- do a GET request where id is the uuid of the event to cancel a future event
### Features