- Initialization
params = {
url: @server url
token: @access token
}
Themes = require("oute-services-themes-sdk")
themes_instance = new Themes(params)
- Save themes
body = {
"_id": "vaPyYqHZD",
"project_id" : "1ZXZKMvvE",
"workspace_id": "ZzBfJMpfQ",
"name": "test",
"state": "ACTIVE",
"url": "https://htmlcolorcodes.com/assets/images/colors/white-color-solid-background-1920x1080.png",
"styles": {
"fontFamily": "Noto Serif",
"questionSize": "14px",
"buttonCorners": "50%",
"textAlignment": "left",
"questions": "#263238",
"answer": "#263238",
"buttons": "#2196F3",
"buttonText": "#FFFFFF",
"backgroundColor": "white",
"backgroundImage": ""
}
}
await themes_instance.save(body)
- Find One
query = {
"_id": "vaPyYqHZD"
}
await themes_instance.findOne(query)
- get list
query = {
"project_id" : "1ZXZKMvvE"
}
await themes_instance.list(query)
- delete themes
themes_id = "vaPyYqHZD"
await themes_instance.delete(themes_id)