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.

ParamsTypeRequired?Description
theme_namestringtrueThe theme name of the subject to be created.
descriptionstringtrueA 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
    }
}

Back to Index

/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
    }
}

Back to Index

/subject/:id

πŸ“˜

Updates the subject :id information with the given one.

ParamsTypeRequired?Description
theme_namestringfalseThe theme name of the subject to be created.
descriptionstringfalseA 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
    }
}

Back to Index

/subject/:id

πŸ“˜

Deletes the given subject :id.

Response

{
    "result": true
}

Back to Index

/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."
        }
    ]
}

Back to Index