mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-20 22:45:09 +00:00
One
This commit is contained in:
32
blog/posts/README.md
Normal file
32
blog/posts/README.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Post Service
|
||||
|
||||
The posts service stores posts
|
||||
|
||||
## Usage
|
||||
|
||||
### Create a post
|
||||
|
||||
```
|
||||
micro call posts Posts.Save '{"post":{"id":"1","title":"How to Micro","content":"Simply put, Micro is awesome."}}'
|
||||
micro call posts Posts.Save '{"post":{"id":"2","title":"Fresh posts are fresh","content":"This post is fresher than the How to Micro one"}}'
|
||||
```
|
||||
|
||||
### Create a post with tags
|
||||
|
||||
```
|
||||
micro call posts Posts.Save '{"post":{"id":"3","title":"How to do epic things with Micro","content":"Everything is awesome.","tagNames":["a","b"]}}'
|
||||
```
|
||||
|
||||
### Query posts
|
||||
|
||||
```
|
||||
micro call posts Posts.Query '{}'
|
||||
micro call posts Posts.Query '{"slug":"how-to-micro"}'
|
||||
micro call posts Posts.Query '{"offset": 10, "limit": 10}'
|
||||
```
|
||||
|
||||
### Delete posts
|
||||
|
||||
```
|
||||
micro call posts Posts.Delete '{"offset": 10, "limit": 10}'
|
||||
```
|
||||
Reference in New Issue
Block a user