{"action":"created","issue":{"url":"https://api.github.com/repos/jonschlinkert/github-base/issues/3","labels_url":"https://api.github.com/repos/jonschlinkert/github-base/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/jonschlinkert/github-base/issues/3/comments","events_url":"https://api.github.com/repos/jonschlinkert/github-base/issues/3/events","html_url":"https://github.com/jonschlinkert/github-base/issues/3","id":100999499,"number":3,"title":"and again, use `simple-get`","user":{"login":"tunnckoCore","id":5038030,"avatar_url":"https://avatars.githubusercontent.com/u/5038030?v=3","gravatar_id":"","url":"https://api.github.com/users/tunnckoCore","html_url":"https://github.com/tunnckoCore","followers_url":"https://api.github.com/users/tunnckoCore/followers","following_url":"https://api.github.com/users/tunnckoCore/following{/other_user}","gists_url":"https://api.github.com/users/tunnckoCore/gists{/gist_id}","starred_url":"https://api.github.com/users/tunnckoCore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tunnckoCore/subscriptions","organizations_url":"https://api.github.com/users/tunnckoCore/orgs","repos_url":"https://api.github.com/users/tunnckoCore/repos","events_url":"https://api.github.com/users/tunnckoCore/events{/privacy}","received_events_url":"https://api.github.com/users/tunnckoCore/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-08-14T12:17:33Z","updated_at":"2015-08-24T17:07:04Z","closed_at":"2015-08-24T17:07:04Z","body":"I definitely realized that it's better to use `simple-get` plus `concat-stream`. It's really small and really better and even smaller than `github-request` huh.\r\nAnd return `callback(err, buffer, stream)` without JSON.parse, cuz Github have endpoints that not return JSON, like `/markdown` and it crash when you try to do that. Returning `buffer` instead of JSON.parse(res) would free us up. Also giving the readable `stream` is  good thing.\r\n\r\nAnother thing is duplication of defaulting `opts.apiurl` and sending everything from `data` to the body of the request. Which isn't okey for me. Like, now it's possible to define placeholders, headers, body, method and etc stuff through `data` from `.post(path, data, cb)`, but you also pass them to the body of the request e.g.\r\n\r\n```js\r\nvar data = {\r\n  owner: 'jonschlinkert',\r\n  repo: 'github-base',\r\n  headers: {\r\n    foobar: 'baz'\r\n  },\r\n  title: 'foo bar',\r\n  body: 'baz qux @chorks woohoo'\r\n  body: {\r\n    bar: 'qux'\r\n  }\r\n}\r\ngithub.post('/repos/:owner/:repo/issues', data, console.log)\r\n```\r\nAll that `data` would be stringified and send to the request (from the index.js .request() directly to github-request pkg), from which only 2 fields are needed for request body.\r\n\r\nAnd here can view another problem. What means that `body`, because some endpoints expect that parameter, like above example - \"Create an issue\" endpoint. But in the `utils.js` in the one if you check that `data` exist, in the other that `opts.body` exist - which actually is `data.body` because the extend.\r\n\r\nAnd exposing token or username+password directly to the server request... don't think so.\r\n\r\n***\r\n\r\nOther than that.. it's awesome, as always!"},"comment":{"url":"https://api.github.com/repos/jonschlinkert/github-base/issues/comments/134302870","html_url":"https://github.com/jonschlinkert/github-base/issues/3#issuecomment-134302870","issue_url":"https://api.github.com/repos/jonschlinkert/github-base/issues/3","id":134302870,"user":{"login":"jonschlinkert","id":383994,"avatar_url":"https://avatars.githubusercontent.com/u/383994?v=3","gravatar_id":"","url":"https://api.github.com/users/jonschlinkert","html_url":"https://github.com/jonschlinkert","followers_url":"https://api.github.com/users/jonschlinkert/followers","following_url":"https://api.github.com/users/jonschlinkert/following{/other_user}","gists_url":"https://api.github.com/users/jonschlinkert/gists{/gist_id}","starred_url":"https://api.github.com/users/jonschlinkert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonschlinkert/subscriptions","organizations_url":"https://api.github.com/users/jonschlinkert/orgs","repos_url":"https://api.github.com/users/jonschlinkert/repos","events_url":"https://api.github.com/users/jonschlinkert/events{/privacy}","received_events_url":"https://api.github.com/users/jonschlinkert/received_events","type":"User","site_admin":false},"created_at":"2015-08-24T17:07:04Z","updated_at":"2015-08-24T17:07:04Z","body":"oops meant to click comment. it's on the way"}}