OpenIsle Docs
API 概览
List notifications GET
Api
Notifications

# List notifications

Retrieve notifications for the current user

GET
/`api`/`notifications`

## Authorization

AuthorizationBearer <token>

In: `header`

## Query Parameters

page?integer
Default `0`
Format `int32`
size?integer
Default `30`
Format `int32`

## Response Body

###

    curl -X GET "https://www.open-isle.com/api/notifications?page=0&size=30"

    [
      {
        "id": 0,
        "type": "POST_VIEWED",
        "post": {
          "id": 0,
          "title": "string",
          "content": "string",
          "createdAt": "2019-08-24T14:15:22Z",
          "author": {
            "id": 0,
            "username": "string",
            "avatar": "string",
            "displayMedal": "COMMENT"
          },
          "category": {
            "id": 0,
            "name": "string",
            "description": "string",
            "icon": "string",
            "smallIcon": "string",
            "count": 0
          },
          "tags": [
            {
              "id": 0,
              "name": "string",
              "description": "string",
              "icon": "string",
              "smallIcon": "string",
              "createdAt": "2019-08-24T14:15:22Z",
              "count": 0
            }
          ],
          "views": 0,
          "commentCount": 0,
          "status": "PUBLISHED",
          "pinnedAt": "2019-08-24T14:15:22Z",
          "lastReplyAt": "2019-08-24T14:15:22Z",
          "reactions": [
            {
              "id": 0,
              "type": "LIKE",
              "user": "string",
              "postId": 0,
              "commentId": 0,
              "messageId": 0,
              "reward": 0
            }
          ],
          "participants": [
            {
              "id": 0,
              "username": "string",
              "avatar": "string",
              "displayMedal": "COMMENT"
            }
          ],
          "subscribed": true,
          "reward": 0,
          "pointReward": 0,
          "type": "NORMAL",
          "lottery": {
            "prizeDescription": "string",
            "prizeIcon": "string",
            "prizeCount": 0,
            "pointCost": 0,
            "startTime": "2019-08-24T14:15:22Z",
            "endTime": "2019-08-24T14:15:22Z",
            "participants": [
              {
                "id": 0,
                "username": "string",
                "avatar": "string",
                "displayMedal": "COMMENT"
              }
            ],
            "winners": [
              {
                "id": 0,
                "username": "string",
                "avatar": "string",
                "displayMedal": "COMMENT"
              }
            ]
          },
          "poll": {
            "options": [
              "string"
            ],
            "votes": {
              "property1": 0,
              "property2": 0
            },
            "endTime": "2019-08-24T14:15:22Z",
            "participants": [
              {
                "id": 0,
                "username": "string",
                "avatar": "string",
                "displayMedal": "COMMENT"
              }
            ],
            "optionParticipants": {
              "property1": [
                {
                  "id": 0,
                  "username": "string",
                  "avatar": "string",
                  "displayMedal": "COMMENT"
                }
              ],
              "property2": [
                {
                  "id": 0,
                  "username": "string",
                  "avatar": "string",
                  "displayMedal": "COMMENT"
                }
              ]
            },
            "multiple": true
          },
          "rssExcluded": true,
          "closed": true
        },
        "comment": {
          "id": 0,
          "content": "string",
          "createdAt": "2019-08-24T14:15:22Z",
          "pinnedAt": "2019-08-24T14:15:22Z",
          "author": {
            "id": 0,
            "username": "string",
            "avatar": "string",
            "displayMedal": "COMMENT"
          },
          "replies": [
            {
              "id": 0,
              "content": "string",
              "createdAt": "2019-08-24T14:15:22Z",
              "pinnedAt": "2019-08-24T14:15:22Z",
              "author": {
                "id": 0,
                "username": "string",
                "avatar": "string",
                "displayMedal": "COMMENT"
              },
              "replies": [],
              "reactions": [
                {
                  "id": 0,
                  "type": "LIKE",
                  "user": "string",
                  "postId": 0,
                  "commentId": 0,
                  "messageId": 0,
                  "reward": 0
                }
              ],
              "reward": 0,
              "pointReward": 0
            }
          ],
          "reactions": [
            {
              "id": 0,
              "type": "LIKE",
              "user": "string",
              "postId": 0,
              "commentId": 0,
              "messageId": 0,
              "reward": 0
            }
          ],
          "reward": 0,
          "pointReward": 0
        },
        "parentComment": {
          "id": 0,
          "content": "string",
          "createdAt": "2019-08-24T14:15:22Z",
          "pinnedAt": "2019-08-24T14:15:22Z",
          "author": {
            "id": 0,
            "username": "string",
            "avatar": "string",
            "displayMedal": "COMMENT"
          },
          "replies": [
            {
              "id": 0,
              "content": "string",
              "createdAt": "2019-08-24T14:15:22Z",
              "pinnedAt": "2019-08-24T14:15:22Z",
              "author": {
                "id": 0,
                "username": "string",
                "avatar": "string",
                "displayMedal": "COMMENT"
              },
              "replies": [],
              "reactions": [
                {
                  "id": 0,
                  "type": "LIKE",
                  "user": "string",
                  "postId": 0,
                  "commentId": 0,
                  "messageId": 0,
                  "reward": 0
                }
              ],
              "reward": 0,
              "pointReward": 0
            }
          ],
          "reactions": [
            {
              "id": 0,
              "type": "LIKE",
              "user": "string",
              "postId": 0,
              "commentId": 0,
              "messageId": 0,
              "reward": 0
            }
          ],
          "reward": 0,
          "pointReward": 0
        },
        "fromUser": {
          "id": 0,
          "username": "string",
          "avatar": "string",
          "displayMedal": "COMMENT"
        },
        "reactionType": "LIKE",
        "content": "string",
        "approved": true,
        "read": true,
        "createdAt": "2019-08-24T14:15:22Z"
      }
    ]

Unread message count GET

Previous Page

List email preferences GET

Next Page

    curl -X GET "https://www.open-isle.com/api/notifications?page=0&size=30"