{"action":"created","issue":{"url":"https://api.github.com/repos/jonschlinkert/github-base/issues/4","labels_url":"https://api.github.com/repos/jonschlinkert/github-base/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/jonschlinkert/github-base/issues/4/comments","events_url":"https://api.github.com/repos/jonschlinkert/github-base/issues/4/events","html_url":"https://github.com/jonschlinkert/github-base/pull/4","id":101365979,"number":4,"title":"rethink defaults","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":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-17T08:13:48Z","updated_at":"2015-08-18T20:22:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jonschlinkert/github-base/pulls/4","html_url":"https://github.com/jonschlinkert/github-base/pull/4","diff_url":"https://github.com/jonschlinkert/github-base/pull/4.diff","patch_url":"https://github.com/jonschlinkert/github-base/pull/4.patch"},"body":"as per #3 \r\n\r\n- **no breaking changes** (only `getAll` method)\r\n- switch to use `simple-get` + `concat-stream`\r\n- use `delegate-properties` instead of custom\r\n- add/update tests (moved to root)\r\n\r\nAs commented, it now sends clean request and pass only needed things to the `simple-get`.\r\n\r\n- allow to pass placeholders in `data`\r\n- allow to pass placeholders in the constructor options (it's useful, instead of pass them to `data` for every method where needs)\r\n- allow to pass Request Options through `simple-get` directly from the constructor options\r\n\r\n## Features / behaving\r\n1. All `options` and `data` are merged, so you can simply override/extend `apiurl`, `method`, `headers` and etc, from `data`.\r\n2. All  `options` from constructor that are not `apiurl`, `token`, `username`, `password` and placeholder (e.g. `method`, `headers` and etc) would be passed to simple-get and respectively to `http(s).request`.\r\n3. All from `data` object that are not placeholder, `url`, `apiurl`, `method`, and `headers` are the body of the request, e.g `http.request({body: body})`\r\n4. Strongly recommend to review the tests, they are pretty straightforward.\r\n\r\nIf you debug in Line 62 with `console.log(opts)`, you'll see that they are pretty clean and do not passes unwanted things to `simple-get` / `http.request`\r\n\r\n\r\nMaybe we should consider to pass directly the string to the callback instead of buffer as currently?\r\nIt's 90% of the cases and the time that you will want string then you will just `JSON.parse` it.\r\n\r\nAlso the `getAll` is not supported in that case. Maybe we should do package for it? Cuz i dont see any good package for that.\r\n\r\nppc: oh i forgot the semicolons, i'll fix that in a bit."},"comment":{"url":"https://api.github.com/repos/jonschlinkert/github-base/issues/comments/132339520","html_url":"https://github.com/jonschlinkert/github-base/pull/4#issuecomment-132339520","issue_url":"https://api.github.com/repos/jonschlinkert/github-base/issues/4","id":132339520,"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},"created_at":"2015-08-18T20:22:19Z","updated_at":"2015-08-18T20:22:19Z","body":"Okey, it's done, but it seems that JSON.parse fails to parse so big data like my or your repos, lol!\r\n\r\n```\r\n[23:19:08][~/lib/github-base][master U:4 ✗]$ node test.js \r\nnode: ../src/node.cc:1404: void node::AppendExceptionLine(node::Environment*, v8::Handle<v8::Value>, v8::Handle<v8::Message>): Assertion `(static_cast<size_t>(off - 1)) <= (sizeof(arrow) - 1)' failed.\r\nAborted\r\n```"}}