{"action":"created","issue":{"url":"https://api.github.com/repos/newteo/team-blog-repo/issues/1","repository_url":"https://api.github.com/repos/newteo/team-blog-repo","labels_url":"https://api.github.com/repos/newteo/team-blog-repo/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/newteo/team-blog-repo/issues/1/comments","events_url":"https://api.github.com/repos/newteo/team-blog-repo/issues/1/events","html_url":"https://github.com/newteo/team-blog-repo/issues/1","id":178887062,"number":1,"title":"分享如何用GitHub Issuse API作为团队博客服务器","user":{"login":"wardenger","id":20606749,"avatar_url":"https://avatars.githubusercontent.com/u/20606749?v=3","gravatar_id":"","url":"https://api.github.com/users/wardenger","html_url":"https://github.com/wardenger","followers_url":"https://api.github.com/users/wardenger/followers","following_url":"https://api.github.com/users/wardenger/following{/other_user}","gists_url":"https://api.github.com/users/wardenger/gists{/gist_id}","starred_url":"https://api.github.com/users/wardenger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wardenger/subscriptions","organizations_url":"https://api.github.com/users/wardenger/orgs","repos_url":"https://api.github.com/users/wardenger/repos","events_url":"https://api.github.com/users/wardenger/events{/privacy}","received_events_url":"https://api.github.com/users/wardenger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-23T14:08:21Z","updated_at":"2016-09-24T18:32:05Z","closed_at":null,"body":"目前用到的主要有三个主要api\r\n\r\n- 博客列表\r\n- 博客详情\r\n- 博客评论\r\n\r\n下面分别说明\r\n\r\n## 博客列表\r\n\r\n```\r\nhttps://api.github.com/repos/newteo/team-blog-repo/issues\r\n```\r\n\r\n返回以下主要数据\r\n\r\n```javascript\r\n[\r\n\t{\r\n\t\ttitle: '', //博客标题\r\n\t\tnumber: '', //博客id\r\n\t\tusers: {\r\n\t\t\tlogin: '', //用户名\r\n\t\t\tavatar_url: ''//用户图像\r\n\t\t}\r\n\t\tupdated_at: '',//更新时间\r\n\t\tbody: ''//博客内容\r\n\t}\r\n\t...\r\n]\r\n```\r\n\r\n## 博客详情\r\n```\r\nhttps://api.github.com/repos/newteo/team-blog-repo/issues/id\r\n//这里的id即是上一个数据结构中的number\r\n```\r\n返回以下主要数据\r\n```\r\n{\r\n\ttitle: '', //博客标题\r\n\tnumber: '', //博客id\r\n\tusers: {\r\n\t\tlogin: '', //用户名\r\n\t\tavatar_url: ''//用户图像\r\n\t}\r\n\tupdated_at: '',//更新时间\r\n\tbody: ''//博客内容\r\n}\r\n```\r\n相信你已经看出来了，不错，跟上面返回的数据几乎是一模一样的，只不过前者返回的是一个数组，而后者返回的是一个object\r\n\r\n## 博客评论\r\n\r\n通过id，我们就能获取单个博客的评论了\r\n\r\n```\r\nhttps://api.github.com/repos/newteo/team-blog-repo/issues/212/comments\r\n```\r\n返回的主要数据是这样，这里我只展示我们博客用到的数据\r\n```javascript\r\n[\r\n  {\r\n  \tuser:{\r\n  \t  login: '',\t//用户名\r\n  \t  avatar_url: '',//用户图像\r\n  \t},\r\n  \tupdated_at: '',//评论更新时间\r\n  \tbody: ''//评论内容\r\n  }\r\n...\r\n]\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/newteo/team-blog-repo/issues/comments/249380205","html_url":"https://github.com/newteo/team-blog-repo/issues/1#issuecomment-249380205","issue_url":"https://api.github.com/repos/newteo/team-blog-repo/issues/1","id":249380205,"user":{"login":"joephon","id":10026619,"avatar_url":"https://avatars.githubusercontent.com/u/10026619?v=3","gravatar_id":"","url":"https://api.github.com/users/joephon","html_url":"https://github.com/joephon","followers_url":"https://api.github.com/users/joephon/followers","following_url":"https://api.github.com/users/joephon/following{/other_user}","gists_url":"https://api.github.com/users/joephon/gists{/gist_id}","starred_url":"https://api.github.com/users/joephon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joephon/subscriptions","organizations_url":"https://api.github.com/users/joephon/orgs","repos_url":"https://api.github.com/users/joephon/repos","events_url":"https://api.github.com/users/joephon/events{/privacy}","received_events_url":"https://api.github.com/users/joephon/received_events","type":"User","site_admin":false},"created_at":"2016-09-24T18:32:04Z","updated_at":"2016-09-24T18:32:04Z","body":"# 蛮好！挺不错！"}}
{"actor":{"display_login":"joephon"}}