{"action":"created","issue":{"url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/3860","labels_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/3860/labels{/name}","comments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/3860/comments","events_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/3860/events","html_url":"https://github.com/wordpress-mobile/WordPress-iOS/pull/3860","id":88434102,"number":3860,"title":"Changed data model to support fallback to REST","user":{"login":"koke","id":8739,"avatar_url":"https://avatars.githubusercontent.com/u/8739?v=3","gravatar_id":"","url":"https://api.github.com/users/koke","html_url":"https://github.com/koke","followers_url":"https://api.github.com/users/koke/followers","following_url":"https://api.github.com/users/koke/following{/other_user}","gists_url":"https://api.github.com/users/koke/gists{/gist_id}","starred_url":"https://api.github.com/users/koke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koke/subscriptions","organizations_url":"https://api.github.com/users/koke/orgs","repos_url":"https://api.github.com/users/koke/repos","events_url":"https://api.github.com/users/koke/events{/privacy}","received_events_url":"https://api.github.com/users/koke/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"oguzkocer","id":662023,"avatar_url":"https://avatars.githubusercontent.com/u/662023?v=3","gravatar_id":"","url":"https://api.github.com/users/oguzkocer","html_url":"https://github.com/oguzkocer","followers_url":"https://api.github.com/users/oguzkocer/followers","following_url":"https://api.github.com/users/oguzkocer/following{/other_user}","gists_url":"https://api.github.com/users/oguzkocer/gists{/gist_id}","starred_url":"https://api.github.com/users/oguzkocer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oguzkocer/subscriptions","organizations_url":"https://api.github.com/users/oguzkocer/orgs","repos_url":"https://api.github.com/users/oguzkocer/repos","events_url":"https://api.github.com/users/oguzkocer/events{/privacy}","received_events_url":"https://api.github.com/users/oguzkocer/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-06-15T13:52:21Z","updated_at":"2015-06-16T12:42:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/pulls/3860","html_url":"https://github.com/wordpress-mobile/WordPress-iOS/pull/3860","diff_url":"https://github.com/wordpress-mobile/WordPress-iOS/pull/3860.diff","patch_url":"https://github.com/wordpress-mobile/WordPress-iOS/pull/3860.patch"},"body":"I needed to change the data model for #3741. Since this PR is already large enough, I'm submitting the data model changes only and I'll do a second PR later with the UI/logic for disabling REST.\r\n\r\nDetails of the model changes are on MIGRATIONS.md, but roughly:\r\n\r\n- All Account objects represent WordPress.com accounts now. Self\r\n  hosted blogs have a nil account and keep track of their\r\n  username/password\r\n- Removed xmlrpc, password, and isWpcom attributes in Account, since they aren't\r\n  useful anymore\r\n- Changed Blog.isJetpack to Blog.isHostedAtWPcom\r\n\r\nOther side effects of the data model change:\r\n\r\n- Updated blog creation methods so they don't create an account for self\r\n  hosted blogs.\r\n- Renamed some methods (*WordPressComAccount* -> *Account*).\r\n- Removed AccountServiceRemoteXMLRPC since it's not used anymore.\r\n- Changed `account.isWpcom` checks to `account != nil`.\r\n- Removed transitional methods to delete WordPress.com passwords.\r\n  Account doesn't have a password attribute anymore, so there's no need\r\n  to delete it.\r\n- Updated tests.\r\n- Added migration test.\r\n\r\nI would have liked a smaller commit, but most of the changes were\r\nrequired for the project to build after the model changes.\r\n\r\n**Important:** when you test this, make sure to also test with `WPJetpackRESTEnabled` set to `NO`, to match the app store version.\r\n\r\nNeeds Review: @oguzkocer @astralbodies "},"comment":{"url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/comments/112411246","html_url":"https://github.com/wordpress-mobile/WordPress-iOS/pull/3860#issuecomment-112411246","issue_url":"https://api.github.com/repos/wordpress-mobile/WordPress-iOS/issues/3860","id":112411246,"user":{"login":"oguzkocer","id":662023,"avatar_url":"https://avatars.githubusercontent.com/u/662023?v=3","gravatar_id":"","url":"https://api.github.com/users/oguzkocer","html_url":"https://github.com/oguzkocer","followers_url":"https://api.github.com/users/oguzkocer/followers","following_url":"https://api.github.com/users/oguzkocer/following{/other_user}","gists_url":"https://api.github.com/users/oguzkocer/gists{/gist_id}","starred_url":"https://api.github.com/users/oguzkocer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oguzkocer/subscriptions","organizations_url":"https://api.github.com/users/oguzkocer/orgs","repos_url":"https://api.github.com/users/oguzkocer/repos","events_url":"https://api.github.com/users/oguzkocer/events{/privacy}","received_events_url":"https://api.github.com/users/oguzkocer/received_events","type":"User","site_admin":false},"created_at":"2015-06-16T12:42:55Z","updated_at":"2015-06-16T12:42:55Z","body":"I am done with my first pass at the review. The changes look mostly good, and I think things will be easier to understand and maintain after this PR is merged. I love that we are not using `WPAccount`s for self-hosted blogs which greatly simplifies things. I have commented on a couple small stuff, but as this is a huge PR, I'd like to do another pass at it later on. It'd be awesome if you can provide some testing instructions aside from setting `WPJetpackRESTEnabled` to `NO`. Is there any particular path we should be testing?\r\n\r\nI'll leave the review of the migration & it's tests to @astralbodies."}}