Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

发送moment #24

Open
hawkwithwind opened this issue May 5, 2019 · 0 comments
Open

发送moment #24

hawkwithwind opened this issue May 5, 2019 · 0 comments

Comments

@hawkwithwind
Copy link
Owner

hawkwithwind commented May 5, 2019

发送moment方法

  • 调用方法
http://chathub/botaction/{:login}
method post 
header  
content-type: application/json
X-Authorize: token
X-Client-Type: type

body 
{
ActionType: "SnsSendMoment",
ActionBody: "... string ... "
}

ActionBody <-- json.stringify
{
"content": "<xml>...</xml>" <-- remove any newline
}
  • 实际调用的是padchat的以下方法

参考 https://github.com/binsee/padchat-sdk/blob/master/docs/index.md#padchatsnssendmomentcontent--promiseobject

samples

  • 实际发送的content体,没有文档支持。只能根据收取到的memoent格式对照整理,参考以下样例。更多可从服务器获取。

  • sample 1

<TimelineObject><id>13060681732567019625</id><username>wxid_m3gf6qagxxfj32</username><createTime>1556954590</createTime><contentDesc>所有的节日都不是为了礼物和红包而生&#x0A;&#x0A;而是为了提醒大家不要忘记爱与被爱&#x0A;&#x0A;爱情和生活都需要仪式感~&#x0A;💙订花礼➕更新号</contentDesc><contentDescShowType>0</contentDescShowType><contentDescScene>3</contentDescScene><private>0</private><sightFolded>0</sightFolded><showFlag>0</showFlag><appInfo><id></id><version></version><appName></appName><installUrl></installUrl><fromUrl></fromUrl><isForceUpdate>0</isForceUpdate></appInfo><sourceUserName></sourceUserName><sourceNickName></sourceNickName><statisticsData></statisticsData><statExtStr></statExtStr><ContentObject><contentStyle>1</contentStyle><title></title><description></description><mediaList><media><id>13060681733099696264</id><type>2</type><title></title><description>所有的节日都不是为了礼物和红包而生&#x0A;&#x0A;而是为了提醒大家不要忘记爱与被爱&#x0A;&#x0A;爱情和生活都需要仪式感~&#x0A;💙订花礼➕更新号</description><private>0</private><userData></userData><subType>0</subType><videoSize width="1080" height="1080"></videoSize><url type="1" videomd5="">http://szmmsns.qpic.cn/mmsns/u9iaIFnNggra8EfOicMT4pwdQuIIkoglx2LicuQSD9I6ayFiaz5wLJAFjk19Ix7icLPnhvtBWRQiaJfFc/0</url><thumb type="1">http://szmmsns.qpic.cn/mmsns/u9iaIFnNggra8EfOicMT4pwdQuIIkoglx2LicuQSD9I6ayFiaz5wLJAFjk19Ix7icLPnhvtBWRQiaJfFc/150</thumb><size width="1080.000000" height="1080.000000" totalSize="0"></size></media><media><id>13060681733094387847</id><type>2</type><title></title><description></description><private>0</private><userData></userData><subType>0</subType><videoSize width="1080" height="1080"></videoSize><url type="1" videomd5="">http://szmmsns.qpic.cn/mmsns/u9iaIFnNggra8EfOicMT4pwdQuIIkoglx2JapPJDwWIia6Q8rSyvnen6Gb3cl5IJzib3ibHcEjFbFDnE/0</url><thumb type="1">http://szmmsns.qpic.cn/mmsns/u9iaIFnNggra8EfOicMT4pwdQuIIkoglx2JapPJDwWIia6Q8rSyvnen6Gb3cl5IJzib3ibHcEjFbFDnE/150</thumb><size width="1080.000000" height="1080.000000" totalSize="0"></size></media><media><id>13060681733094977664</id><type>2</type><title></title><description></description><private>0</private><userData></userData><subType>0</subType><videoSize width="1080" height="1440"></videoSize><url type="1" videomd5="">http://szmmsns.qpic.cn/mmsns/u9iaIFnNggra8EfOicMT4pwdQuIIkoglx2pQFcFZ2LSs8aMic4jKWKckulNjAhGcDqBBEQ3eyUdrIw/0</url><thumb type="1">http://szmmsns.qpic.cn/mmsns/u9iaIFnNggra8EfOicMT4pwdQuIIkoglx2pQFcFZ2LSs8aMic4jKWKckulNjAhGcDqBBEQ3eyUdrIw/150</thumb><size width="1080.000000" height="1440.000000" totalSize="0"></size></media><media><id>13060681733108281473</id><type>2</type><title></title><description></description><private>0</private><userData></userData><subType>0</subType><videoSize width="1080" height="1080"></videoSize><url type="1" videomd5="">http://szmmsns.qpic.cn/mmsns/u9iaIFnNggra8EfOicMT4pwaELKuUicErMnpyAicekZwE9eElZAgT34UloGfcicjGo0wic4z1oGrbL5DE/0</url><thumb type="1">http://szmmsns.qpic.cn/mmsns/u9iaIFnNggra8EfOicMT4pwaELKuUicErMnpyAicekZwE9eElZAgT34UloGfcicjGo0wic4z1oGrbL5DE/150</thumb><size width="1080.000000" height="1080.000000" totalSize="0"></size></media><media><id>13060681733103300710</id><type>2</type><title></title><description></description><private>0</private><userData></userData><subType>0</subType><videoSize width="752" height="974"></videoSize><url type="1" videomd5="">http://szmmsns.qpic.cn/mmsns/u9iaIFnNggra8EfOicMT4pwaELKuUicErMnCh5PpnveQHxHlt7iaAch6D8B6HnNX3Hyh58G6B7yp6Vk/0</url><thumb type="1">http://szmmsns.qpic.cn/mmsns/u9iaIFnNggra8EfOicMT4pwaELKuUicErMnCh5PpnveQHxHlt7iaAch6D8B6HnNX3Hyh58G6B7yp6Vk/150</thumb><size width="752.000000" height="974.000000" totalSize="0"></size></media><media><id>13060681733103431808</id><type>2</type><title></title><description></description><private>0</private><userData></userData><subType>0</subType><videoSize width="1080" height="1080"></videoSize><url type="1" videomd5="">http://szmmsns.qpic.cn/mmsns/u9iaIFnNggra8EfOicMT4pwaELKuUicErMnwY5KzqicBfibgZscO0pfGamibCMcbk89KcGPrfNEhGMfH0/0</url><thumb type="1">http://szmmsns.qpic.cn/mmsns/u9iaIFnNggra8EfOicMT4pwaELKuUicErMnwY5KzqicBfibgZscO0pfGamibCMcbk89KcGPrfNEhGMfH0/150</thumb><size width="1080.000000" height="1080.000000" totalSize="0"></size></media><media><id>13060681733111951504</id><type>2</type><title></title><description></description><private>0</private><userData></userData><subType>0</subType><videoSize width="1078" height="1092"></videoSize><url type="1" videomd5="">http://szmmsns.qpic.cn/mmsns/u9iaIFnNggra8EfOicMT4pwaELKuUicErMn6qmDfDo8icdhGpmThZR1ib3I5qzH7VFlDLR7pibdibAiaiczs/0</url><thumb type="1">http://szmmsns.qpic.cn/mmsns/u9iaIFnNggra8EfOicMT4pwaELKuUicErMn6qmDfDo8icdhGpmThZR1ib3I5qzH7VFlDLR7pibdibAiaiczs/150</thumb><size width="1078.000000" height="1092.000000" totalSize="0"></size></media><media><id>13060681733113327716</id><type>2</type><title></title><description></description><private>0</private><userData></userData><subType>0</subType><videoSize width="1080" height="1080"></videoSize><url type="1" videomd5="">http://szmmsns.qpic.cn/mmsns/u9iaIFnNggra8EfOicMT4pwaELKuUicErMnibKkPX9Julg93LM4HQWZ4bEuBnuc0yu04XQdp49aicqyc/0</url><thumb type="1">http://szmmsns.qpic.cn/mmsns/u9iaIFnNggra8EfOicMT4pwaELKuUicErMnibKkPX9Julg93LM4HQWZ4bEuBnuc0yu04XQdp49aicqyc/150</thumb><size width="1080.000000" height="1080.000000" totalSize="0"></size></media><media><id>13060681733120405648</id><type>2</type><title></title><description></description><private>0</private><userData></userData><subType>0</subType><videoSize width="1078" height="1088"></videoSize><url type="1" videomd5="">http://szmmsns.qpic.cn/mmsns/u9iaIFnNggra8EfOicMT4pwaELKuUicErMnDdiaxicNkibMnnwNZ1pibbpq39cV2q0E5YslTY79y9ibDkaE/0</url><thumb type="1">http://szmmsns.qpic.cn/mmsns/u9iaIFnNggra8EfOicMT4pwaELKuUicErMnDdiaxicNkibMnnwNZ1pibbpq39cV2q0E5YslTY79y9ibDkaE/150</thumb><size width="1078.000000" height="1088.000000" totalSize="0"></size></media></mediaList><contentUrl></contentUrl></ContentObject><actionInfo><appMsg><messageAction></messageAction></appMsg></actionInfo><location poiClassifyId="" poiName="" poiAddress="" poiClassifyType="0" city=""></location><publicUserName></publicUserName><streamvideo><streamvideourl></streamvideourl><streamvideothumburl></streamvideothumburl><streamvideoweburl></streamvideoweburl></streamvideo></TimelineObject>
  • sample 2
<TimelineObject><id><![CDATA[13060681815884173448]]></id><username><![CDATA[wxid_v5m0rozqq6ou21]]></username><createTime><![CDATA[1556954600]]></createTime><contentDescShowType>1</contentDescShowType><contentDescScene>3</contentDescScene><private><![CDATA[0]]></private><contentDesc><![CDATA[出租清源大厦公寓,仅剩一套:
一室一厅一卫,面积50平方,环境优~位置佳~交通非常方便。
可做茶室约好友乐享;
可当公寓享受美好生活;
亦是最佳的商务办公场所;
价格美丽,周围绝对最低!有意向者请联系133 2526 6678]]></contentDesc><contentattr><![CDATA[0]]></contentattr><sourceUserName></sourceUserName><sourceNickName></sourceNickName><statisticsData></statisticsData><weappInfo><appUserName></appUserName><pagePath></pagePath></weappInfo><canvasInfoXml></canvasInfoXml><ContentObject><contentStyle><![CDATA[1]]></contentStyle><contentSubStyle><![CDATA[0]]></contentSubStyle><title></title><description></description><contentUrl></contentUrl><mediaList><media><id><![CDATA[13060681816121348244]]></id><type><![CDATA[2]]></type><title></title><description></description><private><![CDATA[0]]></private><url type="1"><![CDATA[http://shmmsns.qpic.cn/mmsns/dibCvqHg4Wndq64Zuw7cCAeza3ZaIX7zicfKTQNXiaSjibR7Nqo2iaQTRWDLO1XqLnazYaCz1gDSXSCs/0]]></url><thumb type="1"><![CDATA[http://shmmsns.qpic.cn/mmsns/dibCvqHg4Wndq64Zuw7cCAeza3ZaIX7zicfKTQNXiaSjibR7Nqo2iaQTRWDLO1XqLnazYaCz1gDSXSCs/150]]></thumb><size totalSize="50445.0" width="703.0" height="526.0"></size></media><media><id><![CDATA[13060681816122789994]]></id><type><![CDATA[2]]></type><title></title><description></description><private><![CDATA[0]]></private><url type="1"><![CDATA[http://shmmsns.qpic.cn/mmsns/dibCvqHg4Wndq64Zuw7cCAeza3ZaIX7zicXG7PbDYGsFPDDibukZGDjlNBbB35KnviaKwMIJ1aZ1lOI/0]]></url><thumb type="1"><![CDATA[http://shmmsns.qpic.cn/mmsns/dibCvqHg4Wndq64Zuw7cCAeza3ZaIX7zicXG7PbDYGsFPDDibukZGDjlNBbB35KnviaKwMIJ1aZ1lOI/150]]></thumb><size totalSize="315153.0" width="1080.0" height="1920.0"></size></media><media><id><![CDATA[13060681816121413780]]></id><type><![CDATA[2]]></type><title></title><description></description><private><![CDATA[0]]></private><url type="1"><![CDATA[http://shmmsns.qpic.cn/mmsns/dibCvqHg4Wndq64Zuw7cCAeza3ZaIX7ziciaCaPz1ELLMKPTiadXlXWIHk4WibibuEDQxia55ymktkoEyw/0]]></url><thumb type="1"><![CDATA[http://shmmsns.qpic.cn/mmsns/dibCvqHg4Wndq64Zuw7cCAeza3ZaIX7ziciaCaPz1ELLMKPTiadXlXWIHk4WibibuEDQxia55ymktkoEyw/150]]></thumb><size totalSize="64182.0" width="564.0" height="704.0"></size></media></mediaList></ContentObject><actionInfo><appMsg><mediaTagName></mediaTagName><messageExt></messageExt><messageAction></messageAction></appMsg></actionInfo><appInfo><id></id></appInfo><location poiClassifyId="" poiName="" poiAddress="" poiClassifyType="0" city=""></location><publicUserName></publicUserName><streamvideo><streamvideourl></streamvideourl><streamvideothumburl></streamvideothumburl><streamvideoweburl></streamvideoweburl></streamvideo></TimelineObject>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant