- 好友
- 分享
- 精華
- 閱讀權(quán)限
- 255
- 注冊(cè)時(shí)間
- 2017-8-17
|
馬上注冊(cè),結(jié)交更多好友,享用更多功能,讓你輕松玩轉(zhuǎn)社區(qū)
您需要 登錄 才可以下載或查看,沒(méi)有賬號(hào)?立即注冊(cè)
×
獲取短信息列表(群聊)
| | 接口說(shuō)明: | 獲取短信息列表,包括群聊,與DZ內(nèi)置數(shù)據(jù)互通。 |
| 接口詳情 | | 請(qǐng)求地址: | http://demo35.xinxiuvip.com/plugin.php?id=xinxiuvip_network_plugin:pm | | 請(qǐng)求方式: | GET | | 返回格式: | JSON\\XML /*默認(rèn)返回JSON格式,如需返回XML格式,請(qǐng)?jiān)诮涌诰W(wǎng)址后面增加&output=xml參數(shù)*/ |
| 請(qǐng)求參數(shù)(所有參數(shù)值均URL加密后傳輸【注意GBK與UTF8編碼區(qū)別】) | | 參數(shù) | 類型 | 是否必含 | 說(shuō)明 | 示例 | | token | [string] | 是 | token令牌(初始化用戶登錄獲?。?/td> | 7c8ehANCUGOtcVTTIMT0TDqC0Ipq8o0itF4DqgH5K_xin
_xiu_XBl4YFhzu72k3jZx3E_xinxiu_Fa2DR3q | | action | [string] | 是 | 接口方法 | pm_list | | pmtype | [string] | 否 | 消息類型:1為短消息、2為群聊,默認(rèn)為1 | 0 | | start | [string] | 否 | 起始數(shù)據(jù)編號(hào),默認(rèn)0,可為空 | 0 | | limit | [string] | 否 | 返回?cái)?shù)量,默認(rèn)10條,可為空 | 5 | | sort | [string] | 否 | 排序(DESC為降序、ASC升序) | DESC |
| 請(qǐng)求示例(GET) | - http://demo35.xinxiuvip.com/plugin.php?id=xinxiuvip_network_plugin:pm&token={token令牌}&action=pm_list&start=0&limit=5
復(fù)制代碼 |
| 返回參數(shù)(所有接口返回?cái)?shù)據(jù)含中文時(shí)“\\u672c\\u6846”,請(qǐng)用USC2進(jìn)行解碼) | | 參數(shù) | 類型 | 是否必含 | 說(shuō)明 | 示例 | | code | [number] | 是 | http狀態(tài)碼 | 200 | | result | [string] | 是 | 錯(cuò)誤信息狀態(tài)碼 | OK | | count | [number] | 是 | 數(shù)組成員數(shù) | 3 | | data | [object] | 是 | 數(shù)組 | | | data>>pmid | [number] | 是 | 消息id | 14 | | data>>authorid | [string] | 是 | 消息作者uid | 1 | | data>>pmtype | [string] | 是 | 短消息類型:1為私聊,2為群聊 | 1 | | data>>subject | [string] | 是 | 短消息標(biāo)題 | 測(cè)試消息 | | data>>messages | [string] | 是 | 短消息內(nèi)容 | 測(cè)試內(nèi)容 | | data>>min_max | [string] | 是 | 消息關(guān)系:私聊=>顯示雙方uid ,群聊=>顯示成員信息 | 1_6 | | data>>min_max>>plid | [string] | 是 | 群聊消息id | 15 | | data>>min_max>>uid | [string] | 是 | 群聊成員uid | 1 | | data>>min_max>>isnew | [string] | 是 | 是否未讀短消息:0為已讀、1為未讀 | 1 | | data>>min_max>>pmnum | [string] | 是 | 群聊短信息數(shù)目 | 6 | | data>>min_max>>lastupdate | [string] | 是 | 上一次群聊時(shí)間 |
| | data>>min_max>>lastdateline | [string] | 是 | 最后一次聊天時(shí)間 |
| | data>>dateline | [string] | 是 | 聊天開(kāi)始時(shí)間 |
| | data>>lastmessage | [string] | 是 | 最后一條短消息內(nèi)容 |
| | data>>lastmessage>>lastauthorid | [string] | 是 | 最后一條短信息發(fā)送者uid | 3 | | data>>lastmessage>>lastauthor | [string] | 是 | 最后一條短信息發(fā)送者用戶名 | demo | | data>>lastmessage>>lastsummary | [string] | 是 | 短消息內(nèi)容 | 測(cè)試內(nèi)容 | | sqltime | [string] | 是 | 頁(yè)面執(zhí)行時(shí)間(秒) | 0.00651s |
| 返回示例(JSON) | - {
- "code": 200,
- "result": "OK",
- "count": 6,
- "data": {
- "0": {
- "plid": "17",
- "authorid": "1",
- "pmtype": "1",
- "subject": "測(cè)試消息",
- "members": "2",
- "min_max": "1_demo",
- "dateline": "1636442338",
- "lastmessage": {
- "lastauthorid": "1",
- "lastauthor": "admin",
- "lastsummary": "別說(shuō)你看不到啊"
- }
- },
- "1": {
- "plid": "13",
- "authorid": "3",
- "pmtype": "1",
- "subject": "你好啊朋友",
- "members": "2",
- "min_max": "1_3",
- "dateline": "1636437049",
- "lastmessage": {
- "lastauthorid": "1",
- "lastauthor": "admin",
- "lastsummary": "你好啊"
- }
- },
- "2": {
- "plid": "15",
- "authorid": "1",
- "pmtype": "2",
- "subject": "都來(lái)看看,這里是群聊呀",
- "members": "3",
- "min_max": [
- {
- "plid": "15",
- "uid": "1",
- "isnew": "1",
- "pmnum": "1",
- "lastupdate": "1636437252",
- "lastdateline": "1636437252"
- },
- {
- "plid": "15",
- "uid": "3",
- "isnew": "0",
- "pmnum": "1",
- "lastupdate": "0",
- "lastdateline": "1636437252"
- },
- {
- "plid": "15",
- "uid": "6",
- "isnew": "1",
- "pmnum": "1",
- "lastupdate": "0",
- "lastdateline": "1636437252"
- }
- ],
- "dateline": "1636437252",
- "lastmessage": {
- "firstauthorid": "1",
- "firstauthor": "admin",
- "firstsummary": "都來(lái)看看,這里是群聊呀"
- }
- },
- "3": {
- "plid": "16",
- "authorid": "6",
- "pmtype": "1",
- "subject": "別說(shuō)你看不到啊",
- "members": "2",
- "min_max": "1_6",
- "dateline": "1636441599",
- "lastmessage": {
- "lastauthorid": "1",
- "lastauthor": "admin",
- "lastsummary": "按兩個(gè)UID3和6一起發(fā)送"
- }
- },
- "4": {
- "plid": "5",
- "authorid": "1",
- "pmtype": "1",
- "subject": "這是對(duì)外的消息",
- "members": "2",
- "min_max": "1_160",
- "dateline": "1611922787",
- "lastmessage": {
- "lastauthorid": "1",
- "lastauthor": "admin",
- "lastsummary": "這是對(duì)外的消息"
- }
- },
- "count": 13
- },
- "sqltime": "0.02018s"
- }
復(fù)制代碼 |
來(lái)源: 獲取短信息列表 |
|