{"action":"created","issue":{"url":"https://api.github.com/repos/octokit/octokit.net/issues/1120","repository_url":"https://api.github.com/repos/octokit/octokit.net","labels_url":"https://api.github.com/repos/octokit/octokit.net/issues/1120/labels{/name}","comments_url":"https://api.github.com/repos/octokit/octokit.net/issues/1120/comments","events_url":"https://api.github.com/repos/octokit/octokit.net/issues/1120/events","html_url":"https://github.com/octokit/octokit.net/issues/1120","id":138851673,"number":1120,"title":"Add support for interacting with repositories by id.","user":{"login":"Zoltu","id":886059,"avatar_url":"https://avatars.githubusercontent.com/u/886059?v=3","gravatar_id":"","url":"https://api.github.com/users/Zoltu","html_url":"https://github.com/Zoltu","followers_url":"https://api.github.com/users/Zoltu/followers","following_url":"https://api.github.com/users/Zoltu/following{/other_user}","gists_url":"https://api.github.com/users/Zoltu/gists{/gist_id}","starred_url":"https://api.github.com/users/Zoltu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zoltu/subscriptions","organizations_url":"https://api.github.com/users/Zoltu/orgs","repos_url":"https://api.github.com/users/Zoltu/repos","events_url":"https://api.github.com/users/Zoltu/events{/privacy}","received_events_url":"https://api.github.com/users/Zoltu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/octokit/octokit.net/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-03-06T23:55:56Z","updated_at":"2016-03-08T02:24:04Z","closed_at":null,"body":"All of the commands that work with `https://api.github.com/repos/:owner/:repo/` also work with `https://api.github.com/repositories/:id/`.  If one desires to build an application that is resilient to change (e.g., repositories changing names, changing owners, owners changing name, etc.) then the application should be built against the `repositories` API rather than the `repos` API.  Unfortunately, it appears that this library only supports the `repos` API.\r\n\r\nAn application can be mostly resilient against change by saving the ID long term and then using the `repositories` API to convert it to an `owner/repo` right before making the API calls they really want.  This is still not great though as it can race and lead to very unexpected behavior if you are in the middle of a complex transaction (spanning multiple API calls) when the repository moves out from under you.\r\n\r\nPlease add support for making API calls via ID rather than owner/repo so developers can avoid unexpected behavior.\r\n\r\nExample:\r\n```cs\r\npublic interface IBlobsClient\r\n{\r\n\tTask<BlobReference> Create(String owner, String name, NewBlob newBlob);\r\n\tTask<BlobReference> Create(String id, NewBlob newBlob);\r\n\r\n\tTask<Blob> Get(String owner, String name, String reference);\r\n\tTask<Blob> Get(String id, String reference);\r\n}\r\n```\r\n\r\nEven better would be to abstract out the concept into a `Repo` object of some kind that can either be an ID or an owner/name.  That way the public surface area doesn't need to be twice as big.  However, deleting the old methods would be a breaking change and require a major version bump."},"comment":{"url":"https://api.github.com/repos/octokit/octokit.net/issues/comments/193560648","html_url":"https://github.com/octokit/octokit.net/issues/1120#issuecomment-193560648","issue_url":"https://api.github.com/repos/octokit/octokit.net/issues/1120","id":193560648,"user":{"login":"heshuimu","id":7824592,"avatar_url":"https://avatars.githubusercontent.com/u/7824592?v=3","gravatar_id":"","url":"https://api.github.com/users/heshuimu","html_url":"https://github.com/heshuimu","followers_url":"https://api.github.com/users/heshuimu/followers","following_url":"https://api.github.com/users/heshuimu/following{/other_user}","gists_url":"https://api.github.com/users/heshuimu/gists{/gist_id}","starred_url":"https://api.github.com/users/heshuimu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heshuimu/subscriptions","organizations_url":"https://api.github.com/users/heshuimu/orgs","repos_url":"https://api.github.com/users/heshuimu/repos","events_url":"https://api.github.com/users/heshuimu/events{/privacy}","received_events_url":"https://api.github.com/users/heshuimu/received_events","type":"User","site_admin":false},"created_at":"2016-03-08T02:24:04Z","updated_at":"2016-03-08T02:24:04Z","body":"@shiftkey Thank you sir! I appreciate it!"}}