0.0.16 • Published 6 months ago
oute-services-blog-sdk v0.0.16
This module expose helper functions
- Initialization
params = {
url: @server url
token: @access token
}
Blog = require("oute-services-blog-sdk")
blog_instance = new Blog(params)
Cache functions
Core functions
- Save route
body = {
"title": "npm vs yarn",
"keywords": ["npm", "yarn"],
"max_count": 100,
"target_audience": ["developer"],
"tones": ["neutral"],
"blogText": "",
"workspace_id": "ZzBfJMpfQ",
"name" : "test content",
"parent_id" : null,
"project_id": "1ZXZKMvvE",
"annotation": "CONTENT"
}
await blog_instance.save(body)
- Find One
query = {
"_id": "-dGsrg9x6"
}
await blog_instance.findOne(query)
- list
query = {
"title": "npm vs yarn"
}
await blog_instance.list(query)