{"action":"created","comment":{"url":"https://api.github.com/repos/hotosm/oam-catalog/pulls/comments/102365833","pull_request_review_id":23117099,"id":102365833,"diff_hunk":"@@ -0,0 +1,74 @@\n+'use strict';\n+\n+var meta = require('../controllers/meta.js');\n+var request = require('request');\n+\n+/**\n+* LocalOAM Constructor that handles intractions with local OAM bucket server\n+*\n+* @constructor\n+* @param {String} bucket (optional) - Local OAM Bucket URL. Can be set by LOCAL_OAM_BUCKET env var.\n+*/\n+var LocalOAM = function (bucket) {\n+  this.params = {\n+    bucket: bucket || process.env.LOCAL_OAM_BUCKET\n+  };\n+};\n+\n+/**\n+* Read bucket method for LocalOAM. It reads the LocalOAM bucket and adds all the `.json` metadata to Meta model\n+*\n+* @param {responseCallback} cb - The callback that handles the response\n+* @param {finishedCallback} finished - The callback that handles when reading is done\n+*/\n+\n+LocalOAM.prototype.readBucket = function (lastSystemUpdate, cb, done) {\n+  console.info('--- Reading from bucket: ' + this.params.bucket + ' ---');\n+\n+  var self = this;\n+  self.tasks = [];","path":"services/localoam.js","position":29,"original_position":29,"commit_id":"47d44f5810a3e6f9567530208a2675ccbd5b2fce","original_commit_id":"47d44f5810a3e6f9567530208a2675ccbd5b2fce","user":{"login":"mojodna","id":45,"avatar_url":"https://avatars.githubusercontent.com/u/45?v=3","gravatar_id":"","url":"https://api.github.com/users/mojodna","html_url":"https://github.com/mojodna","followers_url":"https://api.github.com/users/mojodna/followers","following_url":"https://api.github.com/users/mojodna/following{/other_user}","gists_url":"https://api.github.com/users/mojodna/gists{/gist_id}","starred_url":"https://api.github.com/users/mojodna/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mojodna/subscriptions","organizations_url":"https://api.github.com/users/mojodna/orgs","repos_url":"https://api.github.com/users/mojodna/repos","events_url":"https://api.github.com/users/mojodna/events{/privacy}","received_events_url":"https://api.github.com/users/mojodna/received_events","type":"User","site_admin":false},"body":"Should this be in the constructor instead? Multiple `readBucket` calls will reset the task list.","created_at":"2017-02-22T01:42:29Z","updated_at":"2017-02-22T01:53:39Z","html_url":"https://github.com/hotosm/oam-catalog/pull/93#discussion_r102365833","pull_request_url":"https://api.github.com/repos/hotosm/oam-catalog/pulls/93","_links":{"self":{"href":"https://api.github.com/repos/hotosm/oam-catalog/pulls/comments/102365833"},"html":{"href":"https://github.com/hotosm/oam-catalog/pull/93#discussion_r102365833"},"pull_request":{"href":"https://api.github.com/repos/hotosm/oam-catalog/pulls/93"}}},"pull_request":{"url":"https://api.github.com/repos/hotosm/oam-catalog/pulls/93","id":106631429,"html_url":"https://github.com/hotosm/oam-catalog/pull/93","diff_url":"https://github.com/hotosm/oam-catalog/pull/93.diff","patch_url":"https://github.com/hotosm/oam-catalog/pull/93.patch","issue_url":"https://api.github.com/repos/hotosm/oam-catalog/issues/93","number":93,"state":"open","locked":false,"title":"Add localoam service","user":{"login":"kamicut","id":719357,"avatar_url":"https://avatars.githubusercontent.com/u/719357?v=3","gravatar_id":"","url":"https://api.github.com/users/kamicut","html_url":"https://github.com/kamicut","followers_url":"https://api.github.com/users/kamicut/followers","following_url":"https://api.github.com/users/kamicut/following{/other_user}","gists_url":"https://api.github.com/users/kamicut/gists{/gist_id}","starred_url":"https://api.github.com/users/kamicut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamicut/subscriptions","organizations_url":"https://api.github.com/users/kamicut/orgs","repos_url":"https://api.github.com/users/kamicut/repos","events_url":"https://api.github.com/users/kamicut/events{/privacy}","received_events_url":"https://api.github.com/users/kamicut/received_events","type":"User","site_admin":false},"body":"This commit adds a new bucket type \"localoam\" that allows for indexing\r\nmetadata locally.\r\n\r\nThe localoam server has 3 endpoints\r\n - /list\r\n - /master.json\r\n - /*.json\r\n`/list` lists the json files at the attached docker volume at `/data`\r\n`/master.json` serves an oin-register like file with a new type\r\n'localoam'\r\nAny other query to the endpoint is returned as an ordinary file server\r\nrequest with the appropriate LastModifed and content-type headers.\r\n\r\nAdditionally, the catalog now has a plugin 'localoam' that allows for\r\nindexing this type of bucket.","created_at":"2017-02-16T22:46:52Z","updated_at":"2017-02-22T01:53:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d4698aa545660b8f2ad84ab73319f54f4d7eba06","assignee":{"login":"smit1678","id":796838,"avatar_url":"https://avatars.githubusercontent.com/u/796838?v=3","gravatar_id":"","url":"https://api.github.com/users/smit1678","html_url":"https://github.com/smit1678","followers_url":"https://api.github.com/users/smit1678/followers","following_url":"https://api.github.com/users/smit1678/following{/other_user}","gists_url":"https://api.github.com/users/smit1678/gists{/gist_id}","starred_url":"https://api.github.com/users/smit1678/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smit1678/subscriptions","organizations_url":"https://api.github.com/users/smit1678/orgs","repos_url":"https://api.github.com/users/smit1678/repos","events_url":"https://api.github.com/users/smit1678/events{/privacy}","received_events_url":"https://api.github.com/users/smit1678/received_events","type":"User","site_admin":false},"assignees":[{"login":"smit1678","id":796838,"avatar_url":"https://avatars.githubusercontent.com/u/796838?v=3","gravatar_id":"","url":"https://api.github.com/users/smit1678","html_url":"https://github.com/smit1678","followers_url":"https://api.github.com/users/smit1678/followers","following_url":"https://api.github.com/users/smit1678/following{/other_user}","gists_url":"https://api.github.com/users/smit1678/gists{/gist_id}","starred_url":"https://api.github.com/users/smit1678/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smit1678/subscriptions","organizations_url":"https://api.github.com/users/smit1678/orgs","repos_url":"https://api.github.com/users/smit1678/repos","events_url":"https://api.github.com/users/smit1678/events{/privacy}","received_events_url":"https://api.github.com/users/smit1678/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/hotosm/oam-catalog/pulls/93/commits","review_comments_url":"https://api.github.com/repos/hotosm/oam-catalog/pulls/93/comments","review_comment_url":"https://api.github.com/repos/hotosm/oam-catalog/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hotosm/oam-catalog/issues/93/comments","statuses_url":"https://api.github.com/repos/hotosm/oam-catalog/statuses/47d44f5810a3e6f9567530208a2675ccbd5b2fce","head":{"label":"hotosm:feature/localfs-indexing","ref":"feature/localfs-indexing","sha":"47d44f5810a3e6f9567530208a2675ccbd5b2fce","user":{"login":"hotosm","id":458752,"avatar_url":"https://avatars.githubusercontent.com/u/458752?v=3","gravatar_id":"","url":"https://api.github.com/users/hotosm","html_url":"https://github.com/hotosm","followers_url":"https://api.github.com/users/hotosm/followers","following_url":"https://api.github.com/users/hotosm/following{/other_user}","gists_url":"https://api.github.com/users/hotosm/gists{/gist_id}","starred_url":"https://api.github.com/users/hotosm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hotosm/subscriptions","organizations_url":"https://api.github.com/users/hotosm/orgs","repos_url":"https://api.github.com/users/hotosm/repos","events_url":"https://api.github.com/users/hotosm/events{/privacy}","received_events_url":"https://api.github.com/users/hotosm/received_events","type":"Organization","site_admin":false},"repo":{"id":35109854,"name":"oam-catalog","full_name":"hotosm/oam-catalog","owner":{"login":"hotosm","id":458752,"avatar_url":"https://avatars.githubusercontent.com/u/458752?v=3","gravatar_id":"","url":"https://api.github.com/users/hotosm","html_url":"https://github.com/hotosm","followers_url":"https://api.github.com/users/hotosm/followers","following_url":"https://api.github.com/users/hotosm/following{/other_user}","gists_url":"https://api.github.com/users/hotosm/gists{/gist_id}","starred_url":"https://api.github.com/users/hotosm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hotosm/subscriptions","organizations_url":"https://api.github.com/users/hotosm/orgs","repos_url":"https://api.github.com/users/hotosm/repos","events_url":"https://api.github.com/users/hotosm/events{/privacy}","received_events_url":"https://api.github.com/users/hotosm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hotosm/oam-catalog","description":"A catalog for OpenAerialMap imagery","fork":false,"url":"https://api.github.com/repos/hotosm/oam-catalog","forks_url":"https://api.github.com/repos/hotosm/oam-catalog/forks","keys_url":"https://api.github.com/repos/hotosm/oam-catalog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hotosm/oam-catalog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hotosm/oam-catalog/teams","hooks_url":"https://api.github.com/repos/hotosm/oam-catalog/hooks","issue_events_url":"https://api.github.com/repos/hotosm/oam-catalog/issues/events{/number}","events_url":"https://api.github.com/repos/hotosm/oam-catalog/events","assignees_url":"https://api.github.com/repos/hotosm/oam-catalog/assignees{/user}","branches_url":"https://api.github.com/repos/hotosm/oam-catalog/branches{/branch}","tags_url":"https://api.github.com/repos/hotosm/oam-catalog/tags","blobs_url":"https://api.github.com/repos/hotosm/oam-catalog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hotosm/oam-catalog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hotosm/oam-catalog/git/refs{/sha}","trees_url":"https://api.github.com/repos/hotosm/oam-catalog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hotosm/oam-catalog/statuses/{sha}","languages_url":"https://api.github.com/repos/hotosm/oam-catalog/languages","stargazers_url":"https://api.github.com/repos/hotosm/oam-catalog/stargazers","contributors_url":"https://api.github.com/repos/hotosm/oam-catalog/contributors","subscribers_url":"https://api.github.com/repos/hotosm/oam-catalog/subscribers","subscription_url":"https://api.github.com/repos/hotosm/oam-catalog/subscription","commits_url":"https://api.github.com/repos/hotosm/oam-catalog/commits{/sha}","git_commits_url":"https://api.github.com/repos/hotosm/oam-catalog/git/commits{/sha}","comments_url":"https://api.github.com/repos/hotosm/oam-catalog/comments{/number}","issue_comment_url":"https://api.github.com/repos/hotosm/oam-catalog/issues/comments{/number}","contents_url":"https://api.github.com/repos/hotosm/oam-catalog/contents/{+path}","compare_url":"https://api.github.com/repos/hotosm/oam-catalog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hotosm/oam-catalog/merges","archive_url":"https://api.github.com/repos/hotosm/oam-catalog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hotosm/oam-catalog/downloads","issues_url":"https://api.github.com/repos/hotosm/oam-catalog/issues{/number}","pulls_url":"https://api.github.com/repos/hotosm/oam-catalog/pulls{/number}","milestones_url":"https://api.github.com/repos/hotosm/oam-catalog/milestones{/number}","notifications_url":"https://api.github.com/repos/hotosm/oam-catalog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hotosm/oam-catalog/labels{/name}","releases_url":"https://api.github.com/repos/hotosm/oam-catalog/releases{/id}","deployments_url":"https://api.github.com/repos/hotosm/oam-catalog/deployments","created_at":"2015-05-05T16:04:55Z","updated_at":"2017-01-06T23:06:46Z","pushed_at":"2017-02-18T01:55:01Z","git_url":"git://github.com/hotosm/oam-catalog.git","ssh_url":"git@github.com:hotosm/oam-catalog.git","clone_url":"https://github.com/hotosm/oam-catalog.git","svn_url":"https://github.com/hotosm/oam-catalog","homepage":"","size":318,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":11,"forks":4,"open_issues":11,"watchers":4,"default_branch":"develop"}},"base":{"label":"hotosm:develop","ref":"develop","sha":"1f8ba282a36e228ff7035d748b587e1960e3d206","user":{"login":"hotosm","id":458752,"avatar_url":"https://avatars.githubusercontent.com/u/458752?v=3","gravatar_id":"","url":"https://api.github.com/users/hotosm","html_url":"https://github.com/hotosm","followers_url":"https://api.github.com/users/hotosm/followers","following_url":"https://api.github.com/users/hotosm/following{/other_user}","gists_url":"https://api.github.com/users/hotosm/gists{/gist_id}","starred_url":"https://api.github.com/users/hotosm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hotosm/subscriptions","organizations_url":"https://api.github.com/users/hotosm/orgs","repos_url":"https://api.github.com/users/hotosm/repos","events_url":"https://api.github.com/users/hotosm/events{/privacy}","received_events_url":"https://api.github.com/users/hotosm/received_events","type":"Organization","site_admin":false},"repo":{"id":35109854,"name":"oam-catalog","full_name":"hotosm/oam-catalog","owner":{"login":"hotosm","id":458752,"avatar_url":"https://avatars.githubusercontent.com/u/458752?v=3","gravatar_id":"","url":"https://api.github.com/users/hotosm","html_url":"https://github.com/hotosm","followers_url":"https://api.github.com/users/hotosm/followers","following_url":"https://api.github.com/users/hotosm/following{/other_user}","gists_url":"https://api.github.com/users/hotosm/gists{/gist_id}","starred_url":"https://api.github.com/users/hotosm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hotosm/subscriptions","organizations_url":"https://api.github.com/users/hotosm/orgs","repos_url":"https://api.github.com/users/hotosm/repos","events_url":"https://api.github.com/users/hotosm/events{/privacy}","received_events_url":"https://api.github.com/users/hotosm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hotosm/oam-catalog","description":"A catalog for OpenAerialMap imagery","fork":false,"url":"https://api.github.com/repos/hotosm/oam-catalog","forks_url":"https://api.github.com/repos/hotosm/oam-catalog/forks","keys_url":"https://api.github.com/repos/hotosm/oam-catalog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hotosm/oam-catalog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hotosm/oam-catalog/teams","hooks_url":"https://api.github.com/repos/hotosm/oam-catalog/hooks","issue_events_url":"https://api.github.com/repos/hotosm/oam-catalog/issues/events{/number}","events_url":"https://api.github.com/repos/hotosm/oam-catalog/events","assignees_url":"https://api.github.com/repos/hotosm/oam-catalog/assignees{/user}","branches_url":"https://api.github.com/repos/hotosm/oam-catalog/branches{/branch}","tags_url":"https://api.github.com/repos/hotosm/oam-catalog/tags","blobs_url":"https://api.github.com/repos/hotosm/oam-catalog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hotosm/oam-catalog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hotosm/oam-catalog/git/refs{/sha}","trees_url":"https://api.github.com/repos/hotosm/oam-catalog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hotosm/oam-catalog/statuses/{sha}","languages_url":"https://api.github.com/repos/hotosm/oam-catalog/languages","stargazers_url":"https://api.github.com/repos/hotosm/oam-catalog/stargazers","contributors_url":"https://api.github.com/repos/hotosm/oam-catalog/contributors","subscribers_url":"https://api.github.com/repos/hotosm/oam-catalog/subscribers","subscription_url":"https://api.github.com/repos/hotosm/oam-catalog/subscription","commits_url":"https://api.github.com/repos/hotosm/oam-catalog/commits{/sha}","git_commits_url":"https://api.github.com/repos/hotosm/oam-catalog/git/commits{/sha}","comments_url":"https://api.github.com/repos/hotosm/oam-catalog/comments{/number}","issue_comment_url":"https://api.github.com/repos/hotosm/oam-catalog/issues/comments{/number}","contents_url":"https://api.github.com/repos/hotosm/oam-catalog/contents/{+path}","compare_url":"https://api.github.com/repos/hotosm/oam-catalog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hotosm/oam-catalog/merges","archive_url":"https://api.github.com/repos/hotosm/oam-catalog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hotosm/oam-catalog/downloads","issues_url":"https://api.github.com/repos/hotosm/oam-catalog/issues{/number}","pulls_url":"https://api.github.com/repos/hotosm/oam-catalog/pulls{/number}","milestones_url":"https://api.github.com/repos/hotosm/oam-catalog/milestones{/number}","notifications_url":"https://api.github.com/repos/hotosm/oam-catalog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hotosm/oam-catalog/labels{/name}","releases_url":"https://api.github.com/repos/hotosm/oam-catalog/releases{/id}","deployments_url":"https://api.github.com/repos/hotosm/oam-catalog/deployments","created_at":"2015-05-05T16:04:55Z","updated_at":"2017-01-06T23:06:46Z","pushed_at":"2017-02-18T01:55:01Z","git_url":"git://github.com/hotosm/oam-catalog.git","ssh_url":"git@github.com:hotosm/oam-catalog.git","clone_url":"https://github.com/hotosm/oam-catalog.git","svn_url":"https://github.com/hotosm/oam-catalog","homepage":"","size":318,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4,"mirror_url":null,"open_issues_count":11,"forks":4,"open_issues":11,"watchers":4,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/hotosm/oam-catalog/pulls/93"},"html":{"href":"https://github.com/hotosm/oam-catalog/pull/93"},"issue":{"href":"https://api.github.com/repos/hotosm/oam-catalog/issues/93"},"comments":{"href":"https://api.github.com/repos/hotosm/oam-catalog/issues/93/comments"},"review_comments":{"href":"https://api.github.com/repos/hotosm/oam-catalog/pulls/93/comments"},"review_comment":{"href":"https://api.github.com/repos/hotosm/oam-catalog/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hotosm/oam-catalog/pulls/93/commits"},"statuses":{"href":"https://api.github.com/repos/hotosm/oam-catalog/statuses/47d44f5810a3e6f9567530208a2675ccbd5b2fce"}}}}
{"actor":{"display_login":"mojodna"}}