{"action":"created","issue":{"url":"https://api.github.com/repos/Kinto/kinto.js/issues/143","labels_url":"https://api.github.com/repos/Kinto/kinto.js/issues/143/labels{/name}","comments_url":"https://api.github.com/repos/Kinto/kinto.js/issues/143/comments","events_url":"https://api.github.com/repos/Kinto/kinto.js/issues/143/events","html_url":"https://github.com/Kinto/kinto.js/pull/143","id":104702359,"number":143,"title":"Fixes #138 - Implement custom id schema's","user":{"login":"michielbdejong","id":408412,"avatar_url":"https://avatars.githubusercontent.com/u/408412?v=3","gravatar_id":"","url":"https://api.github.com/users/michielbdejong","html_url":"https://github.com/michielbdejong","followers_url":"https://api.github.com/users/michielbdejong/followers","following_url":"https://api.github.com/users/michielbdejong/following{/other_user}","gists_url":"https://api.github.com/users/michielbdejong/gists{/gist_id}","starred_url":"https://api.github.com/users/michielbdejong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michielbdejong/subscriptions","organizations_url":"https://api.github.com/users/michielbdejong/orgs","repos_url":"https://api.github.com/users/michielbdejong/repos","events_url":"https://api.github.com/users/michielbdejong/events{/privacy}","received_events_url":"https://api.github.com/users/michielbdejong/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":21,"created_at":"2015-09-03T14:04:38Z","updated_at":"2015-09-15T13:15:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Kinto/kinto.js/pulls/143","html_url":"https://github.com/Kinto/kinto.js/pull/143","diff_url":"https://github.com/Kinto/kinto.js/pull/143.diff","patch_url":"https://github.com/Kinto/kinto.js/pull/143.patch"},"body":"There are still variable names like `options.forceUUID` which refer to the default IdSchema, not sure if that's worth an API change?\r\n\r\nI did not run the integration test locally (I don't have my environment set up correctly yet for that), but I added some unit tests, and unit tests all seem to pass.\r\n\r\nThe approach I took was:\r\n* Move `src/transformers/` to `src/plugins/`.\r\n* Move the UUID-related code into `src/plugins/IdSchema.js`.\r\n* The collection creates an instance of that in `this._idSchema` in the collection constructor. \r\n* The IdSchema class is exposed as `Kinto.IdSchema` for people to derive their custom id schema from.\r\n* I also added `Kinto.createIdSchema` in parallel with `Kinto.createRemoteTransformer`.\r\n* I added a section to `doc/api.md`, let me know if it's clear\r\n* I didn't add much in the way of code comments, I think it's pretty clear, but let me know if you want more comments / docs / unit tests / etc.\r\n\r\nIn any case, I thought maybe you can give me some early feedback and let me know if you like the API, what you think of variable naming, and what I should improve?\r\n\r\nCheers!\r\nMichiel."},"comment":{"url":"https://api.github.com/repos/Kinto/kinto.js/issues/comments/140385065","html_url":"https://github.com/Kinto/kinto.js/pull/143#issuecomment-140385065","issue_url":"https://api.github.com/repos/Kinto/kinto.js/issues/143","id":140385065,"user":{"login":"n1k0","id":41547,"avatar_url":"https://avatars.githubusercontent.com/u/41547?v=3","gravatar_id":"","url":"https://api.github.com/users/n1k0","html_url":"https://github.com/n1k0","followers_url":"https://api.github.com/users/n1k0/followers","following_url":"https://api.github.com/users/n1k0/following{/other_user}","gists_url":"https://api.github.com/users/n1k0/gists{/gist_id}","starred_url":"https://api.github.com/users/n1k0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/n1k0/subscriptions","organizations_url":"https://api.github.com/users/n1k0/orgs","repos_url":"https://api.github.com/users/n1k0/repos","events_url":"https://api.github.com/users/n1k0/events{/privacy}","received_events_url":"https://api.github.com/users/n1k0/received_events","type":"User","site_admin":false},"created_at":"2015-09-15T13:15:08Z","updated_at":"2015-09-15T13:15:08Z","body":"Just take care of squashing the commits first."}}