Mark notifications as read

Issue #336 resolved
Miyata Jumpei created an issue

Are there any API to mark notifications as read? I am trying to implement a tool to report notifications to slack. But I have to pass the last reporting time because the 'read' status of notifications is always false when using the API 'GET /v2/me/notifications'. It is troublesome so I would like to mark notifications as read by API.

Comments (12)

  1. Miyata Jumpei reporter

    Hi @reiz . I'm using the endpoint "https://www.versioneye.com/api/v2/me/notifications" in my tool (https://www.npmjs.com/package/versioneye-slack).

    For example,

    $ versioneye-slack notifications
    

    always post all notifications. So I have to pass the last reporting time like the following to filter old notifications.

    $ versioneye-slack notifications --last-notified-time 2017-01-01T00:00:00.000Z
    

    But saving the last reporting time is troublesome so I would like to filter notifications by the "read" status.

  2. Robert Reiz

    Hi @miyajan. I just double checked the read property on the notification collections and it seems that it never is set to true. Will work on this today. Should be fixed by end of the week!

  3. Robert Reiz

    This is done now. I also fixed the number of unread notifications and added paging to the Endpoint. You can append page=2 for example to get the 2nd page. On each page there are max 30 entries.

  4. Miyata Jumpei reporter

    @reiz The API returns 1st page when I append page=0 and 2nd page when page=1 . In other APIs, they don't handle when page=0 . Are the behaviors what you intended?

  5. Log in to comment