Skip to content
This repository was archived by the owner on Apr 16, 2025. It is now read-only.

Profile Notifications

Mohamad Nour Chawich edited this page May 24, 2016 · 11 revisions

WikiAPI ReferenceNotificationsProfile Notifications

Intro

Users and Pages on Shoutit got notified about various events e.g. a when someone started listening to their shouts.

Notification Object

{
    "id": "67da5c7b-8312-4dc5-b7c2-f09b30aa7fa1",
    "created_at": 1234567890,
    "is_read": false,
    "display": {
        "text": "Someone started listening to your shouts",
        "ranges": [
            {"offset": 0, "length": 7}
        ],
        "image": "https://user-image.static.shoutit.com/86406e84-1a20-4c30-9468-a7c59bb40390.jpg"
    },
    "web_url": "https://www.shoutit.com/profile/someone",
    "app_url": "shoutit://profile?id=86406e84-1a20-4c30-9468-a7c59bb40390",
    "type": "new_listen"
}

Clients should display the display.text and highlight the characters specified in display.ranges. display.image is to be displayed next to the notification. Based on the client, app_url or web_url can be used for redirection when the notification is clicked. The notification must be also marked as read once clicked. type property is irrelevant for clients and they shouldn't depend on it for displaying the notification.

Profile Notifications endpoints

List Profile's notifications

http://dev.api.shoutit.com/docs/#!/notifications/Notification_list

Mark all notifications as read

http://dev.api.shoutit.com/docs/#!/notifications/Notification_reset

Mark single notification as read

http://dev.api.shoutit.com/docs/#!/notifications/Notification_read

Notifications pagination

Just like the Conversations pagination

Clone this wiki locally