{"action":"created","comment":{"url":"https://api.github.com/repos/codex-team/codex.notes.android/pulls/comments/229234699","pull_request_review_id":169682515,"id":229234699,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyOTIzNDY5OQ==","diff_hunk":"@@ -0,0 +1,86 @@\n+package com.notesandroid.codex.notesandroid.interactor\n+\n+import android.content.Context\n+import android.util.Log\n+import com.notesandroid.codex.notesandroid.Database.LocalDatabaseAPI\n+import com.notesandroid.codex.notesandroid.Essences.Content\n+import com.notesandroid.codex.notesandroid.Essences.Folder\n+import com.notesandroid.codex.notesandroid.Essences.Note\n+import com.notesandroid.codex.notesandroid.Essences.Person\n+import com.notesandroid.codex.notesandroid.retrofit.CodeXNotesApi\n+import io.reactivex.Notification\n+import io.reactivex.Observable\n+\n+/**\n+ * Created by Shiplayer on 21.10.18.\n+ */\n+class NoteInteractor {\n+\n+    private lateinit var sql:LocalDatabaseAPI\n+    //private val publishPersonContent = PublishSubject.create<Content>()\n+\n+    public fun attachSQL(context: Context){\n+        sql = LocalDatabaseAPI(context)\n+    }\n+\n+    public fun loadPersonContentFromSql(): Content {","path":"app/src/main/java/com/notesandroid/codex/notesandroid/interactor/NoteInteractor.kt","position":26,"original_position":26,"commit_id":"58a9b30528b6cac76a3fec40415bfbe2a11536d7","original_commit_id":"58a9b30528b6cac76a3fec40415bfbe2a11536d7","user":{"login":"neSpecc","id":3684889,"node_id":"MDQ6VXNlcjM2ODQ4ODk=","avatar_url":"https://avatars0.githubusercontent.com/u/3684889?v=4","gravatar_id":"","url":"https://api.github.com/users/neSpecc","html_url":"https://github.com/neSpecc","followers_url":"https://api.github.com/users/neSpecc/followers","following_url":"https://api.github.com/users/neSpecc/following{/other_user}","gists_url":"https://api.github.com/users/neSpecc/gists{/gist_id}","starred_url":"https://api.github.com/users/neSpecc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neSpecc/subscriptions","organizations_url":"https://api.github.com/users/neSpecc/orgs","repos_url":"https://api.github.com/users/neSpecc/repos","events_url":"https://api.github.com/users/neSpecc/events{/privacy}","received_events_url":"https://api.github.com/users/neSpecc/received_events","type":"User","site_admin":false},"body":"Надо сразу приучиться документировать все методы, а также смысловые части кода по KDoc\r\nhttps://kotlinlang.org/docs/reference/kotlin-doc.html","created_at":"2018-10-30T09:41:23Z","updated_at":"2018-10-30T09:43:28Z","html_url":"https://github.com/codex-team/codex.notes.android/pull/15#discussion_r229234699","pull_request_url":"https://api.github.com/repos/codex-team/codex.notes.android/pulls/15","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/codex-team/codex.notes.android/pulls/comments/229234699"},"html":{"href":"https://github.com/codex-team/codex.notes.android/pull/15#discussion_r229234699"},"pull_request":{"href":"https://api.github.com/repos/codex-team/codex.notes.android/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/codex-team/codex.notes.android/pulls/15","id":226849271,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2ODQ5Mjcx","html_url":"https://github.com/codex-team/codex.notes.android/pull/15","diff_url":"https://github.com/codex-team/codex.notes.android/pull/15.diff","patch_url":"https://github.com/codex-team/codex.notes.android/pull/15.patch","issue_url":"https://api.github.com/repos/codex-team/codex.notes.android/issues/15","number":15,"state":"open","locked":false,"title":"Change okhttp to retrofit","user":{"login":"Shiplayer","id":10272247,"node_id":"MDQ6VXNlcjEwMjcyMjQ3","avatar_url":"https://avatars1.githubusercontent.com/u/10272247?v=4","gravatar_id":"","url":"https://api.github.com/users/Shiplayer","html_url":"https://github.com/Shiplayer","followers_url":"https://api.github.com/users/Shiplayer/followers","following_url":"https://api.github.com/users/Shiplayer/following{/other_user}","gists_url":"https://api.github.com/users/Shiplayer/gists{/gist_id}","starred_url":"https://api.github.com/users/Shiplayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shiplayer/subscriptions","organizations_url":"https://api.github.com/users/Shiplayer/orgs","repos_url":"https://api.github.com/users/Shiplayer/repos","events_url":"https://api.github.com/users/Shiplayer/events{/privacy}","received_events_url":"https://api.github.com/users/Shiplayer/received_events","type":"User","site_admin":false},"body":"In that PR is done:\r\n- Added interactor for saving data in database as we get data from server\r\n- Content has been wrapped in notifications for handling error on view layer.\r\n- Added refresh button to the ActionBar.\r\n- Removed instance ServerSideAuthorization from MainActivity\r\n- Stably working without internet connection","created_at":"2018-10-30T09:36:09Z","updated_at":"2018-10-30T09:43:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"317ef3854328dbe6cb9f6055924aaa5fbfdb36b5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/codex-team/codex.notes.android/pulls/15/commits","review_comments_url":"https://api.github.com/repos/codex-team/codex.notes.android/pulls/15/comments","review_comment_url":"https://api.github.com/repos/codex-team/codex.notes.android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codex-team/codex.notes.android/issues/15/comments","statuses_url":"https://api.github.com/repos/codex-team/codex.notes.android/statuses/58a9b30528b6cac76a3fec40415bfbe2a11536d7","head":{"label":"codex-team:change-okhttp-to-retrofit","ref":"change-okhttp-to-retrofit","sha":"58a9b30528b6cac76a3fec40415bfbe2a11536d7","user":{"login":"codex-team","id":16060815,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDYwODE1","avatar_url":"https://avatars0.githubusercontent.com/u/16060815?v=4","gravatar_id":"","url":"https://api.github.com/users/codex-team","html_url":"https://github.com/codex-team","followers_url":"https://api.github.com/users/codex-team/followers","following_url":"https://api.github.com/users/codex-team/following{/other_user}","gists_url":"https://api.github.com/users/codex-team/gists{/gist_id}","starred_url":"https://api.github.com/users/codex-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codex-team/subscriptions","organizations_url":"https://api.github.com/users/codex-team/orgs","repos_url":"https://api.github.com/users/codex-team/repos","events_url":"https://api.github.com/users/codex-team/events{/privacy}","received_events_url":"https://api.github.com/users/codex-team/received_events","type":"Organization","site_admin":false},"repo":{"id":117150893,"node_id":"MDEwOlJlcG9zaXRvcnkxMTcxNTA4OTM=","name":"codex.notes.android","full_name":"codex-team/codex.notes.android","private":false,"owner":{"login":"codex-team","id":16060815,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDYwODE1","avatar_url":"https://avatars0.githubusercontent.com/u/16060815?v=4","gravatar_id":"","url":"https://api.github.com/users/codex-team","html_url":"https://github.com/codex-team","followers_url":"https://api.github.com/users/codex-team/followers","following_url":"https://api.github.com/users/codex-team/following{/other_user}","gists_url":"https://api.github.com/users/codex-team/gists{/gist_id}","starred_url":"https://api.github.com/users/codex-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codex-team/subscriptions","organizations_url":"https://api.github.com/users/codex-team/orgs","repos_url":"https://api.github.com/users/codex-team/repos","events_url":"https://api.github.com/users/codex-team/events{/privacy}","received_events_url":"https://api.github.com/users/codex-team/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/codex-team/codex.notes.android","description":"CodeX Notes for Android","fork":false,"url":"https://api.github.com/repos/codex-team/codex.notes.android","forks_url":"https://api.github.com/repos/codex-team/codex.notes.android/forks","keys_url":"https://api.github.com/repos/codex-team/codex.notes.android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codex-team/codex.notes.android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codex-team/codex.notes.android/teams","hooks_url":"https://api.github.com/repos/codex-team/codex.notes.android/hooks","issue_events_url":"https://api.github.com/repos/codex-team/codex.notes.android/issues/events{/number}","events_url":"https://api.github.com/repos/codex-team/codex.notes.android/events","assignees_url":"https://api.github.com/repos/codex-team/codex.notes.android/assignees{/user}","branches_url":"https://api.github.com/repos/codex-team/codex.notes.android/branches{/branch}","tags_url":"https://api.github.com/repos/codex-team/codex.notes.android/tags","blobs_url":"https://api.github.com/repos/codex-team/codex.notes.android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codex-team/codex.notes.android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codex-team/codex.notes.android/git/refs{/sha}","trees_url":"https://api.github.com/repos/codex-team/codex.notes.android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codex-team/codex.notes.android/statuses/{sha}","languages_url":"https://api.github.com/repos/codex-team/codex.notes.android/languages","stargazers_url":"https://api.github.com/repos/codex-team/codex.notes.android/stargazers","contributors_url":"https://api.github.com/repos/codex-team/codex.notes.android/contributors","subscribers_url":"https://api.github.com/repos/codex-team/codex.notes.android/subscribers","subscription_url":"https://api.github.com/repos/codex-team/codex.notes.android/subscription","commits_url":"https://api.github.com/repos/codex-team/codex.notes.android/commits{/sha}","git_commits_url":"https://api.github.com/repos/codex-team/codex.notes.android/git/commits{/sha}","comments_url":"https://api.github.com/repos/codex-team/codex.notes.android/comments{/number}","issue_comment_url":"https://api.github.com/repos/codex-team/codex.notes.android/issues/comments{/number}","contents_url":"https://api.github.com/repos/codex-team/codex.notes.android/contents/{+path}","compare_url":"https://api.github.com/repos/codex-team/codex.notes.android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codex-team/codex.notes.android/merges","archive_url":"https://api.github.com/repos/codex-team/codex.notes.android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codex-team/codex.notes.android/downloads","issues_url":"https://api.github.com/repos/codex-team/codex.notes.android/issues{/number}","pulls_url":"https://api.github.com/repos/codex-team/codex.notes.android/pulls{/number}","milestones_url":"https://api.github.com/repos/codex-team/codex.notes.android/milestones{/number}","notifications_url":"https://api.github.com/repos/codex-team/codex.notes.android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codex-team/codex.notes.android/labels{/name}","releases_url":"https://api.github.com/repos/codex-team/codex.notes.android/releases{/id}","deployments_url":"https://api.github.com/repos/codex-team/codex.notes.android/deployments","created_at":"2018-01-11T20:39:23Z","updated_at":"2018-10-27T14:45:26Z","pushed_at":"2018-10-30T09:36:10Z","git_url":"git://github.com/codex-team/codex.notes.android.git","ssh_url":"git@github.com:codex-team/codex.notes.android.git","clone_url":"https://github.com/codex-team/codex.notes.android.git","svn_url":"https://github.com/codex-team/codex.notes.android","homepage":null,"size":4017,"stargazers_count":3,"watchers_count":3,"language":"Kotlin","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":3,"watchers":3,"default_branch":"master"}},"base":{"label":"codex-team:master","ref":"master","sha":"2040c96ad6b2e36e4fe763a9ae6ea24c64a5de53","user":{"login":"codex-team","id":16060815,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDYwODE1","avatar_url":"https://avatars0.githubusercontent.com/u/16060815?v=4","gravatar_id":"","url":"https://api.github.com/users/codex-team","html_url":"https://github.com/codex-team","followers_url":"https://api.github.com/users/codex-team/followers","following_url":"https://api.github.com/users/codex-team/following{/other_user}","gists_url":"https://api.github.com/users/codex-team/gists{/gist_id}","starred_url":"https://api.github.com/users/codex-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codex-team/subscriptions","organizations_url":"https://api.github.com/users/codex-team/orgs","repos_url":"https://api.github.com/users/codex-team/repos","events_url":"https://api.github.com/users/codex-team/events{/privacy}","received_events_url":"https://api.github.com/users/codex-team/received_events","type":"Organization","site_admin":false},"repo":{"id":117150893,"node_id":"MDEwOlJlcG9zaXRvcnkxMTcxNTA4OTM=","name":"codex.notes.android","full_name":"codex-team/codex.notes.android","private":false,"owner":{"login":"codex-team","id":16060815,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDYwODE1","avatar_url":"https://avatars0.githubusercontent.com/u/16060815?v=4","gravatar_id":"","url":"https://api.github.com/users/codex-team","html_url":"https://github.com/codex-team","followers_url":"https://api.github.com/users/codex-team/followers","following_url":"https://api.github.com/users/codex-team/following{/other_user}","gists_url":"https://api.github.com/users/codex-team/gists{/gist_id}","starred_url":"https://api.github.com/users/codex-team/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codex-team/subscriptions","organizations_url":"https://api.github.com/users/codex-team/orgs","repos_url":"https://api.github.com/users/codex-team/repos","events_url":"https://api.github.com/users/codex-team/events{/privacy}","received_events_url":"https://api.github.com/users/codex-team/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/codex-team/codex.notes.android","description":"CodeX Notes for Android","fork":false,"url":"https://api.github.com/repos/codex-team/codex.notes.android","forks_url":"https://api.github.com/repos/codex-team/codex.notes.android/forks","keys_url":"https://api.github.com/repos/codex-team/codex.notes.android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codex-team/codex.notes.android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codex-team/codex.notes.android/teams","hooks_url":"https://api.github.com/repos/codex-team/codex.notes.android/hooks","issue_events_url":"https://api.github.com/repos/codex-team/codex.notes.android/issues/events{/number}","events_url":"https://api.github.com/repos/codex-team/codex.notes.android/events","assignees_url":"https://api.github.com/repos/codex-team/codex.notes.android/assignees{/user}","branches_url":"https://api.github.com/repos/codex-team/codex.notes.android/branches{/branch}","tags_url":"https://api.github.com/repos/codex-team/codex.notes.android/tags","blobs_url":"https://api.github.com/repos/codex-team/codex.notes.android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codex-team/codex.notes.android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codex-team/codex.notes.android/git/refs{/sha}","trees_url":"https://api.github.com/repos/codex-team/codex.notes.android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codex-team/codex.notes.android/statuses/{sha}","languages_url":"https://api.github.com/repos/codex-team/codex.notes.android/languages","stargazers_url":"https://api.github.com/repos/codex-team/codex.notes.android/stargazers","contributors_url":"https://api.github.com/repos/codex-team/codex.notes.android/contributors","subscribers_url":"https://api.github.com/repos/codex-team/codex.notes.android/subscribers","subscription_url":"https://api.github.com/repos/codex-team/codex.notes.android/subscription","commits_url":"https://api.github.com/repos/codex-team/codex.notes.android/commits{/sha}","git_commits_url":"https://api.github.com/repos/codex-team/codex.notes.android/git/commits{/sha}","comments_url":"https://api.github.com/repos/codex-team/codex.notes.android/comments{/number}","issue_comment_url":"https://api.github.com/repos/codex-team/codex.notes.android/issues/comments{/number}","contents_url":"https://api.github.com/repos/codex-team/codex.notes.android/contents/{+path}","compare_url":"https://api.github.com/repos/codex-team/codex.notes.android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codex-team/codex.notes.android/merges","archive_url":"https://api.github.com/repos/codex-team/codex.notes.android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codex-team/codex.notes.android/downloads","issues_url":"https://api.github.com/repos/codex-team/codex.notes.android/issues{/number}","pulls_url":"https://api.github.com/repos/codex-team/codex.notes.android/pulls{/number}","milestones_url":"https://api.github.com/repos/codex-team/codex.notes.android/milestones{/number}","notifications_url":"https://api.github.com/repos/codex-team/codex.notes.android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codex-team/codex.notes.android/labels{/name}","releases_url":"https://api.github.com/repos/codex-team/codex.notes.android/releases{/id}","deployments_url":"https://api.github.com/repos/codex-team/codex.notes.android/deployments","created_at":"2018-01-11T20:39:23Z","updated_at":"2018-10-27T14:45:26Z","pushed_at":"2018-10-30T09:36:10Z","git_url":"git://github.com/codex-team/codex.notes.android.git","ssh_url":"git@github.com:codex-team/codex.notes.android.git","clone_url":"https://github.com/codex-team/codex.notes.android.git","svn_url":"https://github.com/codex-team/codex.notes.android","homepage":null,"size":4017,"stargazers_count":3,"watchers_count":3,"language":"Kotlin","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":3,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codex-team/codex.notes.android/pulls/15"},"html":{"href":"https://github.com/codex-team/codex.notes.android/pull/15"},"issue":{"href":"https://api.github.com/repos/codex-team/codex.notes.android/issues/15"},"comments":{"href":"https://api.github.com/repos/codex-team/codex.notes.android/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/codex-team/codex.notes.android/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/codex-team/codex.notes.android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codex-team/codex.notes.android/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/codex-team/codex.notes.android/statuses/58a9b30528b6cac76a3fec40415bfbe2a11536d7"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"neSpecc"}}