我正在制作一个github问题应用程序,在显示特定repo的问题列表后,我想单击单个问题并导航到问题详细信息页面。
因此,我通过路由参数传递{issue.id}。现在,为了发出获取细节的axios GET请求,我想从给定的id中获取这个特定问题的url?
有谁能给我带路吗?
发布于 2018-05-25 00:32:11
请检查此URL:
https://developer.github.com/v3/issues/#list-issues
Example:
https://api.github.com/repos/octocat/Hello-World/issues
https://api.github.com/repos/octocat/Hello-World/issues{/number}
Hope this helps.回复示例:
[
{
"url": "https://api.github.com/repos/octocat/Hello-World/issues/404",
"repository_url": "https://api.github.com/repos/octocat/Hello-World",
"labels_url": "https://api.github.com/repos/octocat/Hello-World/issues/404/labels{/name}",
"comments_url": "https://api.github.com/repos/octocat/Hello-World/issues/404/comments",
"events_url": "https://api.github.com/repos/octocat/Hello-World/issues/404/events",
"html_url": "https://github.com/octocat/Hello-World/issues/404",
"id": 322291044,
"number": 404,
"title": "Internationalization",
"user": {
"login": "dgruntz",
"id": 1516800,
"avatar_url": "https://avatars0.githubusercontent.com/u/1516800?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dgruntz",
"html_url": "https://github.com/dgruntz",
"followers_url": "https://api.github.com/users/dgruntz/followers",
"following_url": "https://api.github.com/users/dgruntz/following{/other_user}",
"gists_url": "https://api.github.com/users/dgruntz/gists{/gist_id}",
"starred_url": "https://api.github.com/users/dgruntz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dgruntz/subscriptions",
"organizations_url": "https://api.github.com/users/dgruntz/orgs",
"repos_url": "https://api.github.com/users/dgruntz/repos",
"events_url": "https://api.github.com/users/dgruntz/events{/privacy}",
"received_events_url": "https://api.github.com/users/dgruntz/received_events",
"type": "User",
"site_admin": false
},
"labels": [
],
"state": "open",
"locked": false,
"assignee": null,
"assignees": [
],
"milestone": null,
"comments": 0,
"created_at": "2018-05-11T13:11:00Z",
"updated_at": "2018-05-11T13:11:00Z",
"closed_at": null,
"author_association": "NONE",
"body": "I miss internationalization support for this project. Will that ever be added?"
} ]https://stackoverflow.com/questions/50513538
复制相似问题