-
Notifications
You must be signed in to change notification settings - Fork 18
Notification
this path goes under /notification/***
Get user’s notification setting for web-application from user’s id
GET /appSetting
REQUEST BODY
| Parameter | Type | Description |
|---|---|---|
| user_id | string | userId |
EXAMPLE
{
user_id: “xxxxxxxxxx”
}
RESPONSE
| Parameter | Type | Description |
|---|---|---|
| user_id | string | userId |
| noti_type_id | string | Notification setting type for web-application |
EXAMPLE
{
user_id: “xxxxxxxxxx” ,
noti_type_id: “aaaaa”
}
400 ( user not found)
Get user’s notification setting for email from user’s id
GET /emailSetting
REQUEST BODY
| Parameter | Type | Description |
|---|---|---|
| user_id | string | userId |
EXAMPLE
{
user_id: “xxxxxxxxxx”
}
RESPONSE
| Parameter | Type | Description |
|---|---|---|
| user_id | string | userId |
| noti_type_id | string | Notification setting type for email |
EXAMPLE
{
user_id: “xxxxxxxxxx” ,
noti_type_id: “aaaaa”
}
400 ( user not found)
Register new noti_object from any module
Post /registerNotiObject
REQUEST BODY
| Parameter | Type | Description |
|---|---|---|
| value | string | Value that gonna be shown in notifications |
| template_id | string | Id of notification template |
| module_id | string | Id of module’s notification |
| URL | string | URL of source page of notification |
EXAMPLE
{
value: [ “linuk”, “cherry” ] ,
template_id: “bbbbbbb” ,
module_id: “ccccccccc” ,
URL: “https://www.taskade.com/spaces/auBTttpZcKwaz1Lq/subspaces/pGPHjc361QqpGHPC”
}
RESPONSE
| Parameter | Type | Description |
|---|---|---|
| noti_object_id | string | Id of notification object |
| user_id | String | User id of receiver |
| date | DateTime | dateTime when create noti_object |
| isRead | boolean | Status of noti_object |
| value | String | Value that gonna be shown in notifications in array of string |
| template_id | String | Id of notification template |
| module_id | String | Id of module’s notification |
| URL | String | URL of source page of notification |
EXAMPLE
{
noti_object_id: “xxxxxxxxxx” ,
User_id: “vvvvvvvvvv” ,
date: 2016-12-21 00:00:00 ,
isRead: false ,
value: [“linuk”,”cherry”] ,
template_id: “bbbbbbb” ,
module_id: “ccccccccc” ,
URL: “https://www.taskade.com/spaces/auBTttpZcKwaz1Lq/subspaces/pGPHjc361QqpGHPC”
}
400 ( Create noti_object failed )
Get notification from noti_object_id and show to the user
GET /notification
REQUEST BODY
| Parameter | Type | Description |
|---|---|---|
| noti_object_id | string | Id of notification object |
EXAMPLE
{
noti_object_id: “xxxxxxxxxx”
}
RESPONSE
| Parameter | Type | Description |
|---|---|---|
| user_id | string | userId |
| date | datetime | dateTime when create noti_object |
| isRead | boolean | status of noti_object |
| value | string | value that gonna be shown in notifications in array of string |
| template_id | string | id of notification template |
| module_id | string | id of module’s notification |
| URL | string | URL of source page of notification |
EXAMPLE
{
noti_object_id: “xxxxxxxxxx” ,
user_id:”vvvvvvvvvv”,
date: 2016-12-21 00:00:00 ,
isRead: false,
value: [“linuk”,”cherry”] ,
template_id: “bbbbbbb”,
Module_id: “ccccccccc”,
URL:”https://www.taskade.com/spaces/auBTttpZcKwaz1Lq/subspaces/pGPHjc361QqpGHPC”
}
400 ( user not found)
Add new template pattern to the database
POST /addTemplate
REQUEST BODY
| Parameter | Type | Description |
|---|---|---|
| template | string | HTML template of notification |
EXAMPLE
{
template: “yyyy.html”
}
RESPONSE
| Parameter | Type | Description |
|---|---|---|
| template_id | string | Id of notification’s template |
| template | string | HTML template of notification |
EXAMPLE
{
template_id: “ttttttt”,
template: “yyyy.html”
}
400 (Create template failed)
Add new information value for the notifications
Post /addValue
REQUEST BODY
| Parameter | Type | Description |
|---|---|---|
| value | string | Value of notifications |
EXAMPLE
{
value: “Hello”
}
RESPONSE
| Parameter | Type | Description |
|---|---|---|
| value_id | string | id of notification’s value |
| value | string | value of notification |
EXAMPLE
{
value_id: “vvvvvvvvv”,
value: “Hello”
}
400 ( Create value failed)