Skip to main content
The REST API is now versioned. For more information, see "About API versioning."

反应

使用 REST API 与 GitHub 上的反应进行交互。

关于反应

你可以创建和管理对 GitHub 上的评论、问题、拉取请求和讨论的反应。 创建反应时,content 参数的允许值如下(对应的表情符号供参考):

内容 表情符号
+1 👍
-1 👎
laugh 😄
confused 😕
heart ❤️
hooray 🎉
rocket 🚀
eyes 👀

List reactions for a team discussion comment

List the reactions to a team discussion comment. OAuth access tokens require the read:discussion scope.

Note: You can also specify a team by org_id and team_id using the route GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions.

参数

Headers
Name, Type, Description
acceptstring

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
orgstringRequired

The organization name. The name is not case sensitive.

team_slugstringRequired

The slug of the team name.

discussion_numberintegerRequired

The number that identifies the discussion.

comment_numberintegerRequired

The number that identifies the comment.

Query parameters
Name, Type, Description
contentstring

Returns a single reaction type. Omit this parameter to list all reactions to a team discussion comment.

Can be one of: +1, -1, laugh, confused, heart, hooray, rocket, eyes

p