{"action":"created","issue":{"url":"https://api.github.com/repos/aarondcoleman/Fitbit.NET/issues/142","repository_url":"https://api.github.com/repos/aarondcoleman/Fitbit.NET","labels_url":"https://api.github.com/repos/aarondcoleman/Fitbit.NET/issues/142/labels{/name}","comments_url":"https://api.github.com/repos/aarondcoleman/Fitbit.NET/issues/142/comments","events_url":"https://api.github.com/repos/aarondcoleman/Fitbit.NET/issues/142/events","html_url":"https://github.com/aarondcoleman/Fitbit.NET/issues/142","id":135118727,"number":142,"title":"Create a Fitbit.Net.OauthMigration package to aide with migration from OAuth1 to OAuth2","user":{"login":"mxa0079","id":432881,"avatar_url":"https://avatars.githubusercontent.com/u/432881?v=3","gravatar_id":"","url":"https://api.github.com/users/mxa0079","html_url":"https://github.com/mxa0079","followers_url":"https://api.github.com/users/mxa0079/followers","following_url":"https://api.github.com/users/mxa0079/following{/other_user}","gists_url":"https://api.github.com/users/mxa0079/gists{/gist_id}","starred_url":"https://api.github.com/users/mxa0079/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxa0079/subscriptions","organizations_url":"https://api.github.com/users/mxa0079/orgs","repos_url":"https://api.github.com/users/mxa0079/repos","events_url":"https://api.github.com/users/mxa0079/events{/privacy}","received_events_url":"https://api.github.com/users/mxa0079/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"mxa0079","id":432881,"avatar_url":"https://avatars.githubusercontent.com/u/432881?v=3","gravatar_id":"","url":"https://api.github.com/users/mxa0079","html_url":"https://github.com/mxa0079","followers_url":"https://api.github.com/users/mxa0079/followers","following_url":"https://api.github.com/users/mxa0079/following{/other_user}","gists_url":"https://api.github.com/users/mxa0079/gists{/gist_id}","starred_url":"https://api.github.com/users/mxa0079/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxa0079/subscriptions","organizations_url":"https://api.github.com/users/mxa0079/orgs","repos_url":"https://api.github.com/users/mxa0079/repos","events_url":"https://api.github.com/users/mxa0079/events{/privacy}","received_events_url":"https://api.github.com/users/mxa0079/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/aarondcoleman/Fitbit.NET/milestones/2","html_url":"https://github.com/aarondcoleman/Fitbit.NET/milestones/OAuth%202.0%20Stable","labels_url":"https://api.github.com/repos/aarondcoleman/Fitbit.NET/milestones/2/labels","id":1536335,"number":2,"title":"OAuth 2.0 Stable","description":null,"creator":{"login":"aarondcoleman","id":161033,"avatar_url":"https://avatars.githubusercontent.com/u/161033?v=3","gravatar_id":"","url":"https://api.github.com/users/aarondcoleman","html_url":"https://github.com/aarondcoleman","followers_url":"https://api.github.com/users/aarondcoleman/followers","following_url":"https://api.github.com/users/aarondcoleman/following{/other_user}","gists_url":"https://api.github.com/users/aarondcoleman/gists{/gist_id}","starred_url":"https://api.github.com/users/aarondcoleman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aarondcoleman/subscriptions","organizations_url":"https://api.github.com/users/aarondcoleman/orgs","repos_url":"https://api.github.com/users/aarondcoleman/repos","events_url":"https://api.github.com/users/aarondcoleman/events{/privacy}","received_events_url":"https://api.github.com/users/aarondcoleman/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":0,"state":"open","created_at":"2016-01-22T19:29:43Z","updated_at":"2016-02-20T20:49:28Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2016-02-20T20:49:28Z","updated_at":"2016-02-20T22:32:01Z","closed_at":null,"body":"Here is an idea:\r\n\r\nMove all existing functionality related to OAuth1 to a separate package whose responsibility is to ease migration from OAuth1 to OAuth2 (e.g. Fitbit.Net.OauthMigration). This package will depend on Fitbit.Net\r\n\r\nContents of the package:\r\n* `Authenticator`\r\n* All the V1 synchronous methods of `FitbitClient`, implemented as extension methods\r\n* A factory to create an OAuth1 version of  `FitbitClient`\r\n\r\nWhat will be removed from the main package:\r\n*  `Authenticator`\r\n*  All `FitbitClient` constructors marked obsolete -- those are only there to support OAuth1\r\n\r\nAdvantages:\r\n* Eases migration to OAuth2 (better than today due to the legacy methods implemented as extensions methods to `FitbitClient`) WHILE reducing the surface area of the API\r\n* Allows us to easily remove OAuth1 related code from the library without having to issue a major version in a couple of months\r\n* Removes the obscure behavior of our current constructors  (use obsolete constructor to create an OAuth1 client, use new constructor to create an OAuth2 client), it replaces it with an explicit way to create an OAuth1 version of the client (the factory in the migration package)\r\n* Saves us from carrying forward code that will only be used for the first two months of the library's life\r\n\r\nDisadvantages:\r\n* Makes changes to an RC version of the package. However, given that we have had a small number of downloads, I think this is acceptable.\r\n\r\nThoughts?"},"comment":{"url":"https://api.github.com/repos/aarondcoleman/Fitbit.NET/issues/comments/186693451","html_url":"https://github.com/aarondcoleman/Fitbit.NET/issues/142#issuecomment-186693451","issue_url":"https://api.github.com/repos/aarondcoleman/Fitbit.NET/issues/142","id":186693451,"user":{"login":"mxa0079","id":432881,"avatar_url":"https://avatars.githubusercontent.com/u/432881?v=3","gravatar_id":"","url":"https://api.github.com/users/mxa0079","html_url":"https://github.com/mxa0079","followers_url":"https://api.github.com/users/mxa0079/followers","following_url":"https://api.github.com/users/mxa0079/following{/other_user}","gists_url":"https://api.github.com/users/mxa0079/gists{/gist_id}","starred_url":"https://api.github.com/users/mxa0079/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mxa0079/subscriptions","organizations_url":"https://api.github.com/users/mxa0079/orgs","repos_url":"https://api.github.com/users/mxa0079/repos","events_url":"https://api.github.com/users/mxa0079/events{/privacy}","received_events_url":"https://api.github.com/users/mxa0079/received_events","type":"User","site_admin":false},"created_at":"2016-02-20T22:32:01Z","updated_at":"2016-02-20T22:32:01Z","body":"Ok, I gave myself a 2 hour limit on this. I finished removing all OAuth1 code from main package, and moving it into a migration package. \r\n\r\nHowever, the extension method idea is more complex that I thought (given the tight dependency on Rest sharp). I will not spend time implementing that."}}