top
关闭

开发者登录

主要使用场景:

1、动态-详情

前置条件

获取接口访问凭证:accessToken

请求说明

url https://opengate.huijiaoyun.com/openapi/trends/info?accessToken=******
请求方式 GET
格式 json
是否需要鉴权
请求数限制
接口方向 第三方应用>开放平台

参数说明

序号 字段名 约束 位置 类型 长度 说明

1

sessionid

可选

Body(json)

string

-

用户会话id,如果不传,只能看公开的动态

2

id

必选

Body(json)

int

-

动态id

返回说明

序号 字段名 约束 类型 长度 说明

1

code

可选

string

-

返回状态

2

message

可选

string

-

返回消息

3

runtime

可选

string

-

返回速度

4

result

可选

string

-

返回结果

4.1

id

可选

string

-

动态id

4.2

type

可选

int

-

动态动作类型(发布个人文章1001,转载文章1002)

4.3

objecttype

可选

int

-

动态对象类型(规定文章对象类型为1000)

4.4

objectid

可选

string

-

业务动作id(发布文章时的id)

4.5

objectpid

可选

string

-

业务动作分类id(发布文章时的文章分类id)

4.6

comment_id

可选

int

-

被评论、回复的评论id(动态是由评论产生的)

4.7

user_img

可选

string

-

动态主体的用户头像

4.8

user_name

可选

string

-

动态主体的用户姓名

4.9

user_type

可选

string

-

动态主体的用户类型(0学生,1老师,2家长等等)

4.10

user_id

可选

string

-

动态主体的用户id

4.11

content

可选

string

-

业务文字内容(比如文章内容)

4.12

title

可选

string

-

业务文字标题(比如《父亲的手》)

4.13

img_list

可选

json

-

图片二维数组

4.13.1

big_src

可选

string

-

原图片地址

4.13.2

src

可选

string

-

170x170的图片地址

4.14

img_count

可选

string

-

图片的张数

4.15

typename

可选

string

-

业务划分(post文章类型,photo相册类型,res资源类型,msg说说类型)

4.16

resource_download_url

可选

string

-

为资源类型时,提供资源下载地址

4.17

resource_id

可选

string

-

为资源类型时,提供资源文件fid(也可能没资源文件fid)

4.18

resource_icon

可选

string

-

为资源类型时,web资源图标地址

4.19

resource_ext

可选

string

-

为资源类型时,资源格式

4.20

url

可选

string

-

web业务连接地址

4.21

is_report

可选

string

-

是否有举报权限

4.22

is_del

可选

string

-

是否有删除权限

4.23

power

可选

string

-

动态权限范围(1公开,2好友,3私密)

4.24

power_msg

可选

string

-

动态权限文字说明

4.25

fid_type

可选

int

-

二次动态来源类型,转发1,赞2,评论3,回复4

4.26

action_title

可选

string

-

动作描述标题(转发了xx的动态)

4.27

show_startid

可选

string

-

是否为二次动态(true和false,非原生的都属于)

4.28

content_forward

可选

string

-

二次动态描述内容(比如用户转载时写的描述)

4.29

startid_user_id

可选

string

-

源头动态生成者的用户id

4.30

startid_user_name

可选

string

-

源头动态生成者的用户姓名

4.31

startid_user_type

可选

string

-

源头动态生成者的用户类型

4.32

startid_action_title

可选

string

-

源头动态的动作描述标题(发布了文章)

4.33

startid_pubdate

可选

string

-

源头动态友好时间格式

4.34

startid_pubdate_time

可选

string

-

源头动态时间戳

4.35

pubdate

可选

string

-

动态友好时间格式

4.36

pubdate_time

可选

string

-

动态时间戳

4.37

show_form

可选

string

-

动态来自哪里

4.38

is_commont

可选

string

-

动态的展示状态(1公开,0私有)

4.39

show_praise

可选

string

-

是否可以点赞(true和false)

4.40

praise_num

可选

int

-

点赞数

4.41

praise_list

可选

string

-

点赞人列表信息

4.42

praise_exists

可选

string

-

查看者是否已点赞(true和false)

4.43

show_forward

可选

string

-

是否可以转载(true和false)

4.44

forward_num

可选

int

-

转载次数

示例

							请求报文:
http://opengate.t.huijiaoyun.com/openapi/trends/info?accessToken=******&id=******

应答报文:
{
    "code": "000000", 
    "result": {
        "id": 596984, 
        "type": 1001, 
        "objecttype": 1000, 
        "objectid": "1611662943", 
        "objectpid": "2665477", 
        "comment_id": 0, 
        "user_img": "http://www.t.huijiaoyun.com/uploads/avatar/data/85/8/c1a1bea5b90a4f309f96adf11e608cd7_180x180.jpg?1498459355", 
        "user_name": "肖伟", 
        "user_type": 1, 
        "user_id": "c1a1bea5b90a4f309f96adf11e608cd7", 
        "content": "4444", 
        "title": "444", 
        "is_commont": 1, 
        "typename": "post", 
        "url": "http://www.t.huijiaoyun.com/index.php?r=space/person/post/view&sid=c1a1bea5b90a4f309f96adf11e608cd7&id=1611662943", 
        "is_del": false, 
        "is_report": true, 
        "power_msg": "公开", 
        "action_title": "发表了文章", 
        "show_startid": false, 
        "pubdate": "07-25 13:42", 
        "pubdate_time": 1500961333, 
        "show_form": "文章", 
        "show_praise": true, 
        "praise_num": 1, 
        "praise_list": [
            {
                "USER_SYS_CODE": "8495963a22da4b5baf6c321dfdccbcaa", 
                "USER_NAME": "柳小小", 
                "PUBDATE": 1501125682, 
                "ID": null, 
                "PID": null
            }
        ], 
        "praise_exists": false, 
        "show_forward": true, 
        "forward_num": 1
    }, 
    "runtime": "0.01751"
}                        
						

参数说明

请求参数消息体-文本类
序号 字段名 约束 类型 长度 说明

1

msgType

必选

String

10

消息类型,此时固定为:text

1.1

text

必选

Json

-

text消息体

1.1.1

content

必选

String

消息内容

示例

{
	"msgtype": "text",
	"text": {
		"content": "zhxy msg text test 12"
	}
}
											

参数说明

请求参数消息体-link类
序号 字段名 约束 类型 长度 说明

1

msgType

必选

String

10

消息类型,此时固定为:link

2

link

必选

Json

-

link消息体

2.1

pcUrl

必选

String

PC端消息点击链接地址

2.2

appUrl

必选

String

移动客户端点击消息时跳转到的H5地址

2.3

title

必选

String

消息标题

2.4

busiId

必选

String

对应业务的id

2.5

content

必选

String

消息描述

2.6

picUrl

必选

String

图文消息的图片链接,支持JPG、PNG格式,较好的效果为大图640*320,小图80*80。如不填,在客户端不显示图片

示例

{
	"msgtype": "link",
	"link": {
		"pcUrl": "http://www.baidu.com",
		"appUrl": "http://www.baidu.com",
		"picUrl": "http://xxx.yyy.com/zzz.jpg",
		"content": "百度一下",
		"title": "百度",
		"busiId":"AQWER1234"
	}
}
											

参数说明

请求参数消息体-oa类
序号 字段名 约束 类型 长度 说明

1

msgType

必选

String

10

消息类型,此时固定为:oa

2

busiId

必选

String

-

该条oa消息在业务系统对应的id

3

pcUrl

必选

String

消息点击链接地址

4

appUrl

必选

String

移动客户端点击消息时跳转到的H5地址

5

oa

必选

Json

-

oa类型消息体

5.1

head

必选

Json

255

消息头部Json

5.1.1

text

必选

String

255

消息的头部标题

5.1.2

bgColor

可选

String

消息头部的背景颜色。长度限制为8个英文字符,其中前2为表示透明度,后6位表示颜色值。不要添加0x。默认值:FFCC0000

5.2

body

可选

Json

消息体

5.2.1

title

可选

String

消息体的标题

5.2.2

content

可选

String

消息体的正文

5.2.3

imageUrl

可选

String

消息体中的图片url

5.2.4

fileCount

可选

String

自定义的附件数目。此数字仅供显示,不作验证

5.2.5

author

可选

String

自定义的作者名字

5.2.6

form

可选

Json数组

消息体的表单,最多6个

5.2.7

key

可选

String

消息体的关键字

5.2.8

value

可选

String

消息体的关键字对应的值