{"action":"closed","issue":{"url":"https://api.github.com/repos/hoodiehq/account-json-api/issues/9","labels_url":"https://api.github.com/repos/hoodiehq/account-json-api/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/hoodiehq/account-json-api/issues/9/comments","events_url":"https://api.github.com/repos/hoodiehq/account-json-api/issues/9/events","html_url":"https://github.com/hoodiehq/account-json-api/issues/9","id":119109374,"number":9,"title":"change /accounts/<username> routes to /accounts/<id>","user":{"login":"gr2m","id":39992,"avatar_url":"https://avatars.githubusercontent.com/u/39992?v=3","gravatar_id":"","url":"https://api.github.com/users/gr2m","html_url":"https://github.com/gr2m","followers_url":"https://api.github.com/users/gr2m/followers","following_url":"https://api.github.com/users/gr2m/following{/other_user}","gists_url":"https://api.github.com/users/gr2m/gists{/gist_id}","starred_url":"https://api.github.com/users/gr2m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gr2m/subscriptions","organizations_url":"https://api.github.com/users/gr2m/orgs","repos_url":"https://api.github.com/users/gr2m/repos","events_url":"https://api.github.com/users/gr2m/events{/privacy}","received_events_url":"https://api.github.com/users/gr2m/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"gr2m","id":39992,"avatar_url":"https://avatars.githubusercontent.com/u/39992?v=3","gravatar_id":"","url":"https://api.github.com/users/gr2m","html_url":"https://github.com/gr2m","followers_url":"https://api.github.com/users/gr2m/followers","following_url":"https://api.github.com/users/gr2m/following{/other_user}","gists_url":"https://api.github.com/users/gr2m/gists{/gist_id}","starred_url":"https://api.github.com/users/gr2m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gr2m/subscriptions","organizations_url":"https://api.github.com/users/gr2m/orgs","repos_url":"https://api.github.com/users/gr2m/repos","events_url":"https://api.github.com/users/gr2m/events{/privacy}","received_events_url":"https://api.github.com/users/gr2m/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-11-26T23:12:16Z","updated_at":"2015-11-30T05:06:53Z","closed_at":"2015-11-30T05:06:53Z","body":"I liked the idea of using usernames as IDs in the URLs, but it’s inconsistent with all the rest of our APIs, and could potentially cause issue with JSON API clients. \r\n\r\nFor example `GET /accounts/jane-doe` would return \r\n\r\n```json\r\n{\r\n    \"links\": {\r\n        \"self\": \"https://example.com/accounts/jane-doe\"\r\n    },\r\n    \"data\": {\r\n        \"id\": \"def678\",\r\n        \"type\": \"account\",\r\n        \"attributes\": {\r\n            \"username\": \"jane-doe\",\r\n        }\r\n    },\r\n    \"relationships\": {\r\n        \"profile\": {\r\n            \"links\": {\r\n                \"related\": \"https://example.com/accounts/jane-doe/profile\"\r\n            },\r\n            \"data\": {\r\n                \"id\": \"def678-profile\",\r\n                \"type\": \"accountProfile\"\r\n            }\r\n        }\r\n    }\r\n}\r\n```\r\n\r\nBut `data.id` is `\"def678\"`, not `\"jane-doe\"`. I'm not sure if this is JSON API compliant or not, but when in doubt, I'd rather avoid confusion.\r\n\r\nNot using the username in the URLs also prevents issues with weird characters in usernames.\r\n\r\n---\r\n\r\n- [x] start a pr #11 \r\n- [x] make the fix (breaking change)\r\n- [x] review & merge"}}