Subject
The Subject is a static list of default subjects that can be used when notification is send. It is mainly used with email because an email should be send with a subject.
Routes
/subject
Creates a new subject or retrives the subject if it was created before.
| Params | Type | Required? | Description |
|---|---|---|---|
| theme_name | string | true | The theme name of the subject to be created. |
| description | string | true | A string with the default subject that will be sent with the notification. |
Response
{
"result": {
"theme_id": 1,
"description": "You have got a new follower.",
"id": 1
}
}
/subject/:id
Get the given subject :id information.
No params expected.
Response
{
"result": {
"theme_id": 1,
"description": "You have got a new follower.",
"id": 1
}
}
/subject/:id
Updates the subject :id information with the given one.
| Params | Type | Required? | Description |
|---|---|---|---|
| theme_name | string | false | The theme name of the subject to be created. |
| description | string | false | A string with the default subject that will be sent with the notification. |
Response
Updating the subject description.
{
"result": {
"theme_id": 1,
"description": "Yay! a new follower!",
"id": 1
}
}
/subject/:id
Deletes the given subject :id.
Response
{
"result": true
}
/subjects
Retrives all the stored subjets of the database.
No params expected.
Response
{
"result": [
{
"id": 1,
"theme_id": 1,
"description": "You have got a new follower."
},
{
"id": 2,
"theme_id": 2,
"description": "A user have commented something on your wall."
}
]
}
Updated less than a minute ago