Androidの 社区接口返回json格式

1. 根据名称搜索房间信息

/api/v1/directory

{
    "result": [{
        "_id": "GENERAL",
        "ts": "2021-04-08T08:09:12.657Z",
        "t": "c",
        "name": "gong1-gao4",
        "usersCount": 16,
        "default": true,
        "lastMessage": {
            "msg": "[py呵呵][py呵呵][py呵呵][py呵呵]",
            "_id": "1620813743435d91bd995-ce4a-47e8-a9f8-ad77d9b966b6",
            "rid": "GENERAL",
            "ts": "2021-05-12T10:02:22.120Z",
            "u": {
                "_id": "ovLcEhgzhYdbp8Go3",
                "username": "yatuizi",
                "username_color": "black"
            },
            "mentions": [],
            "channels": [],
            "_updatedAt": "2021-05-12T10:02:22.125Z"
        },
        "fname": "公告"
    }],
    "count": 1,
    "offset": 0,
    "total": 1,
    "success": true
}

2. 发送消息

/api/v1/method.call/sendMessage

文本消息发送
{
    "success": true,
    "message": "{
               \"msg\":\"result\",
               \"result\":{
                     \"msg\":\"切切切\",
                     \"extra\":{\"custom_emoji_id\":\"\",\"type\":\"message\"},
                     \"_id\":\"1622108033766994e7637-afc9-4142-8098-184c52196e97\",
                     \"rid\":\"EnW2tLmrFEqt9T234\",
                     \"ts\":{\"$date\":1622108034217},
                     \"u\":{\"_id\":\"kEkuexjZyq8CMptMf\",\"username\":\"13311919563\",
                                     \"username_color\":\"black\"},
                    \"mentions\":[],
                    \"channels\":[],
                    \"_updatedAt\":{\"$date\":1622108034224}
                   }
          }"
}
Http网址消息发送
{
    "success": true,
    "message": "{
               \"msg\":\"result\",
               \"result\": {
                         \"msg\":\"http://www.baidu.com\",
                         \"extra\":{\"custom_emoji_id\":\"\",\"type\":\"message\"},
                         \"_id\":\"16221088922085dab03db-7589-4a7c-93f0-728c2765a06a\",
                         \"rid\":\"EnW2tLmrFEqt9T234\",
                         \"ts\":{\"$date\":1622108892665},
                         \"u\":{\"_id\":\"kEkuexjZyq8CMptMf\",\"username\":\"13311919563\",
                                           \"username_color\":\"black\"},
                         \"urls\": [{  "url":"http://www.bilibili.com",
                                       "meta":{ "pageTitle":"哔哩哔哩 (゜-゜)つロ 干杯~-bilibili",
                                                      "description":"bilibili是国内知名的视......到许多欢乐。"},
                                       "headers":{"contentType":"text/html; charset=utf-8"},
                                       "parsedUrl":{"host":"www.bilibili.com","hash":null,"pathname":"/",
                                                           "protocol":"http:","port":null,"query":null,"search":null,
                                                          "hostname":"www.bilibili.com"}
                                 }],
                         \"mentions\":[],
                         \"channels\":[],
                         \"_updatedAt\":{\"$date\":1622108892673}
                    }
                }"
}
收藏表情,图片 -消息发送
{
    "message": "{
                \"msg\":\"result\",
                \"result\":{
                        \"msg\":\"\",
                        \"extra\":{\"type\":\"custom_emoji\",
                                      \"url\":\"http://pychat-dev.oss-cn-shanghai.aliyuncs.com/b845eec3e629902697810a5175082c20\",
                                      \"file_type\":\"image/jpeg\"},
                        \"_id\":\"1622112344736696b1ddd-67ef-4bd2-9f67-61a17bf3085b\",
                        \"rid\":\"EnW2tLmrFEqt9T234\",
                        \"ts\":{\"$date\":1622112345198},
                        \"u\":{\"_id\":\"kEkuexjZyq8CMptMf\",\"username\":\"13311919563\",
                               \"username_color\":\"black\"},
                        \"mentions\":[],
                        \"channels\":[],
                        \"_updatedAt\":{\"$date\":1622112345242}
                 }
          }",
    "success": true
}

3. 发送图片消息-上传图片

/api/v1/rooms.upload/EnW2tLmrFEqt9T234 (roomId)

{
    "message": {
        "_id": "THDLkWtCBTjZkoanX",
        "rid": "EnW2tLmrFEqt9T234",
        "ts": "2021-05-27T10:25:53.402Z",
        "msg": "",
        "file": {
            "_id": "tunYKc5WSSGce8gE4",
            "name": "d0d52c23dd76b774.jpg",
            "type": "image/*"
        },
        "attachments": [{
            "title": "d0d52c23dd76b774.jpg",
            "type": "file",
            "title_link": "/file-upload/tunYKc5WSSGce8gE4/d0d52c23dd76b774.jpg",
            "title_link_download": true,
            "image_url": "/file-upload/tunYKc5WSSGce8gE4/d0d52c23dd76b774.jpg",
            "image_type": "image/*",
            "image_size": 29129,
            "image_preview": "/9j/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAAUACADASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAMEBQcG/8QAJhAAAgICAgAEBwAAAAAAAAAAAQIAAwQFESESMWFxFCIkUVJykv/EABkBAAEFAAAAAAAAAAAAAAAAAAUAAgMEBv/EAB0RAAICAwADAAAAAAAAAAAAAAECAAMFERIGMUH/2gAMAwEAAhEDEQA/AEJq+R0kRkawAdpOv0W/0OeSCxpAHm5ElZmVojz9XTx7iJPIkD8NHnCuV6EzS/XL+MrsjXL38s0S3K0Dtx8XWD7iRrK9JYT4cur+hC1OeSDLsO5+TL6brERyGPXqZV3ZdzhuWPn9zCEydYG4esY8+45cdbquXZ+fRjEZFIqQlGcH9oQkqk7lNp//2Q=="
        }],
        "u": {
            "_id": "kEkuexjZyq8CMptMf",
            "username": "13311919563",
            "username_color": "black"
        },
        "_updatedAt": "2021-05-27T10:25:53.413Z"
    },
    "success": true
}

4. 收藏表情--上传图片

/api/steampy_commnuty/custom_emoji

{"success":true}

5. 收藏表情--查询列表

/api/steampy_commnuty/custom_emoji/list?uid=kEkuexjZyq8CMptMf&page=1&size=20

{
    "success": true,
    "data": {
        "list": [{
            "_id": "60af76a7928c9280fb29f2f0",
            "uid": "kEkuexjZyq8CMptMf",
            "emoji_id": {
                "_id": "60af76a7928c9280fb29f2ef",
                "data": "http://pychat-dev.oss-cn-shanghai.aliyuncs.com/67845aa485c4fe67e5effee4d1575c3c",
                "type": "image/jpeg",
                "hash": "67845aa485c4fe67e5effee4d1575c3c",
                "created_at": "2021-05-27T10:38:31.501Z",
                "updated_at": "2021-05-27T10:38:31.501Z",
                "__v": 0
            },
            "created_at": "2021-05-27T10:38:31.505Z",
            "updated_at": "2021-05-27T10:38:31.505Z",
            "__v": 0
        }],
        "count": 5
    }
}

6. 收藏表情--删除

/api/steampy_commnuty/custom_emoji/60af76a7928c9280fb29f2f0?uid=kEkuexjZyq8CMptMf

{"success":true}
上传单独图片,消息返回JSON
{
    "msg": "",
    "itemType": 2,
    "pinned": false,
    "attachments": [
        {
            "audioSize": 0,
            "title_link_download": true,
            "image_size": 95609,
            "image_url": "/file-upload/ryXFeN7RYeuxx6kyA/steampy_chat_emotion975db486-9eef-4fda-a1ff-0f8860e50a6e.jpg",
            "image_preview": "/9j/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAAgABIDASIAAhEBAxEB/8QAGQAAAgMBAAAAAAAAAAAAAAAAAAUGBwgE/8QAIxAAAgEEAgICAwAAAAAAAAAAAQMCAAQFERIhIjEGkRMVcf/EABYBAQEBAAAAAAAAAAAAAAAAAAIDAf/EABwRAQEAAgIDAAAAAAAAAAAAAAEAAhESEwQxUf/aAAwDAQACEQMRAD8Am/xzOpymKRclYH5I+RJpki3w1k0XMUQLZ+zv1Wa8JlMghK7VT2nXQEfQFS5eRyqLCVwgybMDRiDvVF8nAdI0OzddpytnvpwA/tFZuln8oZEkvBJ9aoqvbhbyfl2YNX66SpIZHmw8Z8x0RUour63s1mNpEAyHeqrVN5JjATI6FMGX5K+IPZ6qLgSAPRO5ZMbPjH6op1bfCWut1M2fOAl9iit4yv/Z",
            "title_link": "/file-upload/ryXFeN7RYeuxx6kyA/steampy_chat_emotion975db486-9eef-4fda-a1ff-0f8860e50a6e.jpg",
            "title": "steampy_chat_emotion975db486-9eef-4fda-a1ff-0f8860e50a6e.jpg",
            "type": "file",
            "videoSize": 0,
            "image_type": "image/*",
            "timestamp": 0
        }
    ],
    "synced": false,
    "unread": false,
    "parseUrls": false,
    "rid": "EnW2tLmrFEqt9T234",
    "file": {
        "name": "steampy_chat_emotion975db486-9eef-4fda-a1ff-0f8860e50a6e.jpg",
        "_id": "ryXFeN7RYeuxx6kyA",
        "type": "image/*"
    },
    "channels": [],
    "u": {
        "_id": "G3yN4DtYqfsuGtseg",
        "username": "userXb"
    },
    "mentions": [],
    "groupable": false,
    "_id": "fg6pdqxqKiCTogt24",
    "_updatedAt": {
        "$date": 1622019128502
    },
    "ts": {
        "$date": 1622019128492
    }
}
引用---上传单独图片,消息返回JSON
{
    "msg": "[ ](http://100/channel/xin1-shou3-hu4-zhu4?msg=1622020960777ab1a5d78-f526-41c7-b7a9-c2a76b0a30dc) bnnnnmm",
    "itemType": 2,
    "pinned": false,
    "attachments": [
        {
            "audioSize": 0,
            "author_icon": "/avatar/userXb",
            "author_name": "userXb",
            "attachments": [],
            "title_link_download": false,
            "image_size": 0,
            "message_link": "http://100/channel/xin1-shou3-hu4-zhu4?msg=1622020960777ab1a5d78-f526-41c7-b7a9-c2a76b0a30dc",
            "text": "",
            "videoSize": 0,
            "timestamp": 0,
            "ts": {
                "$date": 1622020959991
            }
        }
    ],
    "synced": false,
    "unread": false,
    "parseUrls": false,
    "rid": "WMJcJCheatPQoQBGx",
    "urls": [
        {
            "ignoreParse": true,
            "url": "http://100/channel/xin1-shou3-hu4-zhu4?msg=1622020960777ab1a5d78-f526-41c7-b7a9-c2a76b0a30dc"
        }
    ],
    "channels": [],
    "u": {
        "_id": "kEkuexjZyq8CMptMf",
        "username": "13311919563"
    },
    "extra": {
        "type": "custom_emoji"
    },
    "mentions": [],
    "groupable": false,
    "_id": "16220242923434f4a10f8-206a-4a32-b6f6-990a111880cd",
    "_updatedAt": {
        "$date": 1622024287642
    },
    "ts": {
        "$date": 1622024287576
    }
}

7. 消息列表

/api/v1/method.call/loadHistory

普通文本消息
1624855161(1).jpg
{
    "message": {
        "msg": "result",
        "id": "14",
        "result": {
            "messages": [{
                "_id": "sgz3R6WYxuSB3FG5e",
                "rid": "H8jzbwpxkAYT4C7Du",
                "msg": "1222222",
                "ts": {
                    "$date": 1624853804378
                },
                "u": {
                    "_id": "kEkuexjZyq8CMptMf",
                    "username": "13311919563",
                    "username_color": "black",
                    "name": "李元芳来了"
                },
                "mentions": [],
                "channels": [],
                "_updatedAt": {
                    "$date": 1624853804391
                }
            }],
            "unreadNotLoaded": 0
        }
    },
    "success": true
}
创建讨论串消息
1624857799(1).jpg
{
    "message": {
        "msg": "result",
        "id": "14",
        "result": {
            "messages": [{
                "_id": "53wSMvBLDQahDyk2J",
                "t": "discussion-created",
                "rid": "H8jzbwpxkAYT4C7Du",
                "ts": {
                    "$date": 1624853826296
                },
                "msg": "1222222",
                "u": {
                    "_id": "G3yN4DtYqfsuGtseg",
                    "username": "userXb",
                    "name": "松下问童子"
                },
                "groupable": false,
                "drid": "n2H637AiXxdAp3sWp",
                "attachments": [{
                    "text": "1222222",
                    "author_name": "13311919563",
                    "author_icon": "/avatar/13311919563",
                    "message_link": "/channel/a1-gen1-ting2-ren2-ju4-ji2-di4?msg=sgz3R6WYxuSB3FG5e",
                    "ts": {
                        "$date": 1624853804378
                    }
                }],
                "_updatedAt": {
                    "$date": 1624853826418
                },
                "dcount": 1,
                "dlm": {
                    "$date": 1624853826303
                }
            }],
            "unreadNotLoaded": 0
        }
    },
    "success": true
}

一级标题

二级标题

五级标题
  • 列表第一项
  • 列表第二项
  1. 有序列表第一项
  2. 有序列表第二项
    标题
    [图片上传失败...(image-bb222b-1622027165745)]
    斜体
    粗体

引用段落

代码块
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 203,937评论 6 478
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 85,503评论 2 381
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 150,712评论 0 337
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 54,668评论 1 276
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 63,677评论 5 366
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,601评论 1 281
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,975评论 3 396
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,637评论 0 258
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,881评论 1 298
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,621评论 2 321
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,710评论 1 329
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,387评论 4 319
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,971评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,947评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,189评论 1 260
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 44,805评论 2 349
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,449评论 2 342

推荐阅读更多精彩内容

  • 用两张图告诉你,为什么你的 App 会卡顿? - Android - 掘金 Cover 有什么料? 从这篇文章中你...
    hw1212阅读 12,680评论 2 59
  • 我是黑夜里大雨纷飞的人啊 1 “又到一年六月,有人笑有人哭,有人欢乐有人忧愁,有人惊喜有人失落,有的觉得收获满满有...
    陌忘宇阅读 8,520评论 28 53
  • 人工智能是什么?什么是人工智能?人工智能是未来发展的必然趋势吗?以后人工智能技术真的能达到电影里机器人的智能水平吗...
    ZLLZ阅读 3,763评论 0 5
  • 首先介绍下自己的背景: 我11年左右入市到现在,也差不多有4年时间,看过一些关于股票投资的书籍,对于巴菲特等股神的...
    瞎投资阅读 5,648评论 3 8
  • ![Flask](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAW...
    极客学院Wiki阅读 7,229评论 0 3