JIKE
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users

    NodeBB获取未读消息列表接口?

    技术分享
    2
    10
    217
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • malaohu
      我是小马甲~ 🤫 last edited by

      NodeBB获取未读消息列表接口

      @ChatGPT

      唐宋元明清,连排小工兵!

      ChatGPT 1 Reply Last reply Reply Quote 0
      • ChatGPT
        ChatGPT @malaohu last edited by

        NodeBB提供了一个API接口,可以用来获取未读消息列表:

        GET /api/notifications

        返回:

        [
        	{
        		"nid": "12345",
        		"type": "notification",
        		"data": {
        			"type": "new_post",
        			"pid": "12345",
        			"tid": "12345",
        			"from": {
        				"username": "JohnDoe",
        				"picture": "/path/to/picture"
        			},
        			"title": "This is a post title",
        			"content": "This is the content of the post"
        		},
        		"read": false
        	},
        	// ...
        ]
        

        采用最强大的GPT-3模型。直接在帖子内容中 @ChatGPT (注意前后空格)即可。

        1 Reply Last reply Reply Quote 1
        • malaohu
          我是小马甲~ 🤫 last edited by malaohu

          NodeBB 设置消息为已读接口?
          @ChatGPT

          唐宋元明清,连排小工兵!

          ChatGPT 1 Reply Last reply Reply Quote 0
          • ChatGPT
            ChatGPT @malaohu last edited by

            NodeBB暂时没有一个明确的接口来设置消息为已读,但是你可以使用下面的接口来实现:

            • PUT /api/v3/users/:uid/notifications/read:可以用来将指定用户的所有通知设置为已读。

            • PUT /api/v3/users/:uid/notifications/:nid/read:可以用来将指定用户的指定通知设置为已读。

            采用最强大的GPT-3模型。直接在帖子内容中 @ChatGPT (注意前后空格)即可。

            malaohu 1 Reply Last reply Reply Quote 1
            • malaohu
              我是小马甲~ 🤫 @ChatGPT last edited by

              ChatGPT 说:

              NodeBB暂时没有一个明确的接口来设置消息为已读,但是你可以使用下面的接口来实现:

              • PUT /api/v3/users/:uid/notifications/read:可以用来将指定用户的所有通知设置为已读。

              • PUT /api/v3/users/:uid/notifications/:nid/read:可以用来将指定用户的指定通知设置为已读。

              @ChatGPT
              提示错误:

              {
                  "status": {
                      "code": "not-found",
                      "message": "无效 API 调用"
                  },
                  "response": {}
              }
              

              唐宋元明清,连排小工兵!

              ChatGPT 1 Reply Last reply Reply Quote 0
              • ChatGPT
                ChatGPT @malaohu last edited by

                malaohu说:

                ChatGPT 说:

                NodeBB暂时没有一个明确的接口来设置消息为已读,但是你可以使用下面的接口来实现:

                • PUT /api/v3/users/:uid/notifications/read:可以用来将指定用户的所有通知设置为已读。

                • PUT /api/v3/users/:uid/notifications/:nid/read:可以用来将指定用户的指定通知设置为已读。

                提示错误:

                {
                   "status": {
                       "code": "not-found",
                       "message": "无效 API 调用"
                   },
                   "response": {}
                }
                

                采用最强大的GPT-3模型。直接在帖子内容中 @ChatGPT (注意前后空格)即可。

                1 Reply Last reply Reply Quote 0
                • malaohu
                  我是小马甲~ 🤫 last edited by

                  NodeBB 通知设置已读接口?
                  @ChatGPT

                  唐宋元明清,连排小工兵!

                  ChatGPT 1 Reply Last reply Reply Quote 0
                  • ChatGPT
                    ChatGPT @malaohu last edited by

                    malaohu说:

                    NodeBB 通知设置已读接口?

                    NodeBB有一个API叫做“markAllNotificationsRead”,它可以完成这个任务。它的文档可以在这里找到:https://docs.nodebb.org/api/notifications/#markallnotificationsread

                    采用最强大的GPT-3模型。直接在帖子内容中 @ChatGPT (注意前后空格)即可。

                    malaohu 1 Reply Last reply Reply Quote 0
                    • malaohu
                      我是小马甲~ 🤫 @ChatGPT last edited by

                      ChatGPT 说:

                      malaohu说:

                      NodeBB 通知设置已读接口?

                      NodeBB有一个API叫做“markAllNotificationsRead”,它可以完成这个任务。它的文档可以在这里找到:https://docs.nodebb.org/api/notifications/#markallnotificationsread

                      @ChatGPT 这个API不存在

                      唐宋元明清,连排小工兵!

                      ChatGPT 1 Reply Last reply Reply Quote 0
                      • ChatGPT
                        ChatGPT @malaohu last edited by

                        malaohu说:

                        ChatGPT 说:

                        malaohu说:

                        NodeBB 通知设置已读接口?

                        NodeBB有一个API叫做“markAllNotificationsRead”,它可以完成这个任务。它的文档可以在这里找到:https://docs.nodebb.org/api/notifications/#markallnotificationsread

                        这个API不存在

                        ,只有“markTopicNotificationsRead”和“markNotificationRead”两个API。它们的文档可以在这里找到:

                        https://docs.nodebb.org/api/notifications/#marktopicnotificationsread

                        https://docs.nodebb.org/api/notifications/#marknotificationread

                        采用最强大的GPT-3模型。直接在帖子内容中 @ChatGPT (注意前后空格)即可。

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post