{"action":"created","comment":{"url":"https://api.github.com/repos/iTowns/itowns/pulls/comments/170880127","pull_request_review_id":99631131,"id":170880127,"diff_hunk":"@@ -162,8 +161,14 @@ Scheduler.prototype.execute = function execute(command) {\n     return command.promise;\n };\n \n-\n Scheduler.prototype.addProtocolProvider = function addProtocolProvider(protocol, provider) {\n+    if (typeof (provider.executeCommand) !== 'function') {\n+        throw new Error(`Can't add provider for ${protocol}: missing a executeCommand function.`);\n+    }\n+    if (typeof (provider.preprocessDataLayer) !== 'function') {\n+        throw new Error(`Can't add provider for ${protocol}: missing a preprocessDataLayer function.`);\n+    }\n+","path":"src/Core/Scheduler/Scheduler.js","position":37,"original_position":37,"commit_id":"8083b0a946310ff1e3f91f0da05388687f4d4fab","original_commit_id":"8083b0a946310ff1e3f91f0da05388687f4d4fab","user":{"login":"autra","id":1576598,"avatar_url":"https://avatars3.githubusercontent.com/u/1576598?v=4","gravatar_id":"","url":"https://api.github.com/users/autra","html_url":"https://github.com/autra","followers_url":"https://api.github.com/users/autra/followers","following_url":"https://api.github.com/users/autra/following{/other_user}","gists_url":"https://api.github.com/users/autra/gists{/gist_id}","starred_url":"https://api.github.com/users/autra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autra/subscriptions","organizations_url":"https://api.github.com/users/autra/orgs","repos_url":"https://api.github.com/users/autra/repos","events_url":"https://api.github.com/users/autra/events{/privacy}","received_events_url":"https://api.github.com/users/autra/received_events","type":"User","site_admin":false},"body":"Nice! That's the first step to *really* allow people to add their own providers (I mean, it was already possible, but you needed to know the internals of iTowns). Second step would be to document it :-)","created_at":"2018-02-27T10:39:11Z","updated_at":"2018-02-27T10:43:10Z","html_url":"https://github.com/iTowns/itowns/pull/671#discussion_r170880127","pull_request_url":"https://api.github.com/repos/iTowns/itowns/pulls/671","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/iTowns/itowns/pulls/comments/170880127"},"html":{"href":"https://github.com/iTowns/itowns/pull/671#discussion_r170880127"},"pull_request":{"href":"https://api.github.com/repos/iTowns/itowns/pulls/671"}}},"pull_request":{"url":"https://api.github.com/repos/iTowns/itowns/pulls/671","id":171620108,"html_url":"https://github.com/iTowns/itowns/pull/671","diff_url":"https://github.com/iTowns/itowns/pull/671.diff","patch_url":"https://github.com/iTowns/itowns/pull/671.patch","issue_url":"https://api.github.com/repos/iTowns/itowns/issues/671","number":671,"state":"open","locked":false,"title":"refactor(core): Homogenize all providers as static","user":{"login":"zarov","id":741255,"avatar_url":"https://avatars2.githubusercontent.com/u/741255?v=4","gravatar_id":"","url":"https://api.github.com/users/zarov","html_url":"https://github.com/zarov","followers_url":"https://api.github.com/users/zarov/followers","following_url":"https://api.github.com/users/zarov/following{/other_user}","gists_url":"https://api.github.com/users/zarov/gists{/gist_id}","starred_url":"https://api.github.com/users/zarov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zarov/subscriptions","organizations_url":"https://api.github.com/users/zarov/orgs","repos_url":"https://api.github.com/users/zarov/repos","events_url":"https://api.github.com/users/zarov/events{/privacy}","received_events_url":"https://api.github.com/users/zarov/received_events","type":"User","site_admin":false},"body":"## Description\r\nThere is no reason to keep an instance of each provider, and moving them\r\nto static like some other one (PointCloudProvider for example) do no\r\nharm, but homogenize all providers to one structure.\r\n\r\nNote that the function `getPointOrder` in the WFS provider is unused, should I delete it in this PR, or the associated TODO will be done by someone soon ?\r\n\r\nAlso note that there are two required functions in a provider:\r\npreprocessDataLayer and executeCommand, that are verified when adding a\r\nprovider, in the scheduler.\r\n\r\n## Motivation and Context\r\n\r\nThis comes in the work of #182, part of rewriting the Providers/Loader/etc system.\r\n","created_at":"2018-02-27T10:26:58Z","updated_at":"2018-02-27T10:43:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b9e6cd033032f59b42dc49231d8bfd29eaa683d8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/iTowns/itowns/pulls/671/commits","review_comments_url":"https://api.github.com/repos/iTowns/itowns/pulls/671/comments","review_comment_url":"https://api.github.com/repos/iTowns/itowns/pulls/comments{/number}","comments_url":"https://api.github.com/repos/iTowns/itowns/issues/671/comments","statuses_url":"https://api.github.com/repos/iTowns/itowns/statuses/8083b0a946310ff1e3f91f0da05388687f4d4fab","head":{"label":"zarov:provider-instance-to-static","ref":"provider-instance-to-static","sha":"8083b0a946310ff1e3f91f0da05388687f4d4fab","user":{"login":"zarov","id":741255,"avatar_url":"https://avatars2.githubusercontent.com/u/741255?v=4","gravatar_id":"","url":"https://api.github.com/users/zarov","html_url":"https://github.com/zarov","followers_url":"https://api.github.com/users/zarov/followers","following_url":"https://api.github.com/users/zarov/following{/other_user}","gists_url":"https://api.github.com/users/zarov/gists{/gist_id}","starred_url":"https://api.github.com/users/zarov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zarov/subscriptions","organizations_url":"https://api.github.com/users/zarov/orgs","repos_url":"https://api.github.com/users/zarov/repos","events_url":"https://api.github.com/users/zarov/events{/privacy}","received_events_url":"https://api.github.com/users/zarov/received_events","type":"User","site_admin":false},"repo":{"id":113550888,"name":"itowns","full_name":"zarov/itowns","owner":{"login":"zarov","id":741255,"avatar_url":"https://avatars2.githubusercontent.com/u/741255?v=4","gravatar_id":"","url":"https://api.github.com/users/zarov","html_url":"https://github.com/zarov","followers_url":"https://api.github.com/users/zarov/followers","following_url":"https://api.github.com/users/zarov/following{/other_user}","gists_url":"https://api.github.com/users/zarov/gists{/gist_id}","starred_url":"https://api.github.com/users/zarov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zarov/subscriptions","organizations_url":"https://api.github.com/users/zarov/orgs","repos_url":"https://api.github.com/users/zarov/repos","events_url":"https://api.github.com/users/zarov/events{/privacy}","received_events_url":"https://api.github.com/users/zarov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zarov/itowns","description":"A Three.js-based framework written in Javascript/WebGL for visualizing 3D geospatial data","fork":true,"url":"https://api.github.com/repos/zarov/itowns","forks_url":"https://api.github.com/repos/zarov/itowns/forks","keys_url":"https://api.github.com/repos/zarov/itowns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zarov/itowns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zarov/itowns/teams","hooks_url":"https://api.github.com/repos/zarov/itowns/hooks","issue_events_url":"https://api.github.com/repos/zarov/itowns/issues/events{/number}","events_url":"https://api.github.com/repos/zarov/itowns/events","assignees_url":"https://api.github.com/repos/zarov/itowns/assignees{/user}","branches_url":"https://api.github.com/repos/zarov/itowns/branches{/branch}","tags_url":"https://api.github.com/repos/zarov/itowns/tags","blobs_url":"https://api.github.com/repos/zarov/itowns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zarov/itowns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zarov/itowns/git/refs{/sha}","trees_url":"https://api.github.com/repos/zarov/itowns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zarov/itowns/statuses/{sha}","languages_url":"https://api.github.com/repos/zarov/itowns/languages","stargazers_url":"https://api.github.com/repos/zarov/itowns/stargazers","contributors_url":"https://api.github.com/repos/zarov/itowns/contributors","subscribers_url":"https://api.github.com/repos/zarov/itowns/subscribers","subscription_url":"https://api.github.com/repos/zarov/itowns/subscription","commits_url":"https://api.github.com/repos/zarov/itowns/commits{/sha}","git_commits_url":"https://api.github.com/repos/zarov/itowns/git/commits{/sha}","comments_url":"https://api.github.com/repos/zarov/itowns/comments{/number}","issue_comment_url":"https://api.github.com/repos/zarov/itowns/issues/comments{/number}","contents_url":"https://api.github.com/repos/zarov/itowns/contents/{+path}","compare_url":"https://api.github.com/repos/zarov/itowns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zarov/itowns/merges","archive_url":"https://api.github.com/repos/zarov/itowns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zarov/itowns/downloads","issues_url":"https://api.github.com/repos/zarov/itowns/issues{/number}","pulls_url":"https://api.github.com/repos/zarov/itowns/pulls{/number}","milestones_url":"https://api.github.com/repos/zarov/itowns/milestones{/number}","notifications_url":"https://api.github.com/repos/zarov/itowns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zarov/itowns/labels{/name}","releases_url":"https://api.github.com/repos/zarov/itowns/releases{/id}","deployments_url":"https://api.github.com/repos/zarov/itowns/deployments","created_at":"2017-12-08T08:28:24Z","updated_at":"2017-12-08T09:13:17Z","pushed_at":"2018-02-27T10:35:22Z","git_url":"git://github.com/zarov/itowns.git","ssh_url":"git@github.com:zarov/itowns.git","clone_url":"https://github.com/zarov/itowns.git","svn_url":"https://github.com/zarov/itowns","homepage":"http://www.itowns-project.org","size":5616,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"iTowns:master","ref":"master","sha":"2c26e255e27d94b0fa1532213530e70cfd147802","user":{"login":"iTowns","id":14266889,"avatar_url":"https://avatars2.githubusercontent.com/u/14266889?v=4","gravatar_id":"","url":"https://api.github.com/users/iTowns","html_url":"https://github.com/iTowns","followers_url":"https://api.github.com/users/iTowns/followers","following_url":"https://api.github.com/users/iTowns/following{/other_user}","gists_url":"https://api.github.com/users/iTowns/gists{/gist_id}","starred_url":"https://api.github.com/users/iTowns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iTowns/subscriptions","organizations_url":"https://api.github.com/users/iTowns/orgs","repos_url":"https://api.github.com/users/iTowns/repos","events_url":"https://api.github.com/users/iTowns/events{/privacy}","received_events_url":"https://api.github.com/users/iTowns/received_events","type":"Organization","site_admin":false},"repo":{"id":43068275,"name":"itowns","full_name":"iTowns/itowns","owner":{"login":"iTowns","id":14266889,"avatar_url":"https://avatars2.githubusercontent.com/u/14266889?v=4","gravatar_id":"","url":"https://api.github.com/users/iTowns","html_url":"https://github.com/iTowns","followers_url":"https://api.github.com/users/iTowns/followers","following_url":"https://api.github.com/users/iTowns/following{/other_user}","gists_url":"https://api.github.com/users/iTowns/gists{/gist_id}","starred_url":"https://api.github.com/users/iTowns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iTowns/subscriptions","organizations_url":"https://api.github.com/users/iTowns/orgs","repos_url":"https://api.github.com/users/iTowns/repos","events_url":"https://api.github.com/users/iTowns/events{/privacy}","received_events_url":"https://api.github.com/users/iTowns/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/iTowns/itowns","description":"A Three.js-based framework written in Javascript/WebGL for visualizing 3D geospatial data","fork":false,"url":"https://api.github.com/repos/iTowns/itowns","forks_url":"https://api.github.com/repos/iTowns/itowns/forks","keys_url":"https://api.github.com/repos/iTowns/itowns/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iTowns/itowns/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iTowns/itowns/teams","hooks_url":"https://api.github.com/repos/iTowns/itowns/hooks","issue_events_url":"https://api.github.com/repos/iTowns/itowns/issues/events{/number}","events_url":"https://api.github.com/repos/iTowns/itowns/events","assignees_url":"https://api.github.com/repos/iTowns/itowns/assignees{/user}","branches_url":"https://api.github.com/repos/iTowns/itowns/branches{/branch}","tags_url":"https://api.github.com/repos/iTowns/itowns/tags","blobs_url":"https://api.github.com/repos/iTowns/itowns/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iTowns/itowns/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iTowns/itowns/git/refs{/sha}","trees_url":"https://api.github.com/repos/iTowns/itowns/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iTowns/itowns/statuses/{sha}","languages_url":"https://api.github.com/repos/iTowns/itowns/languages","stargazers_url":"https://api.github.com/repos/iTowns/itowns/stargazers","contributors_url":"https://api.github.com/repos/iTowns/itowns/contributors","subscribers_url":"https://api.github.com/repos/iTowns/itowns/subscribers","subscription_url":"https://api.github.com/repos/iTowns/itowns/subscription","commits_url":"https://api.github.com/repos/iTowns/itowns/commits{/sha}","git_commits_url":"https://api.github.com/repos/iTowns/itowns/git/commits{/sha}","comments_url":"https://api.github.com/repos/iTowns/itowns/comments{/number}","issue_comment_url":"https://api.github.com/repos/iTowns/itowns/issues/comments{/number}","contents_url":"https://api.github.com/repos/iTowns/itowns/contents/{+path}","compare_url":"https://api.github.com/repos/iTowns/itowns/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iTowns/itowns/merges","archive_url":"https://api.github.com/repos/iTowns/itowns/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iTowns/itowns/downloads","issues_url":"https://api.github.com/repos/iTowns/itowns/issues{/number}","pulls_url":"https://api.github.com/repos/iTowns/itowns/pulls{/number}","milestones_url":"https://api.github.com/repos/iTowns/itowns/milestones{/number}","notifications_url":"https://api.github.com/repos/iTowns/itowns/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iTowns/itowns/labels{/name}","releases_url":"https://api.github.com/repos/iTowns/itowns/releases{/id}","deployments_url":"https://api.github.com/repos/iTowns/itowns/deployments","created_at":"2015-09-24T13:24:26Z","updated_at":"2018-02-24T03:14:43Z","pushed_at":"2018-02-27T10:40:30Z","git_url":"git://github.com/iTowns/itowns.git","ssh_url":"git@github.com:iTowns/itowns.git","clone_url":"https://github.com/iTowns/itowns.git","svn_url":"https://github.com/iTowns/itowns","homepage":"http://www.itowns-project.org","size":6070,"stargazers_count":85,"watchers_count":85,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":52,"mirror_url":null,"archived":false,"open_issues_count":87,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":52,"open_issues":87,"watchers":85,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/iTowns/itowns/pulls/671"},"html":{"href":"https://github.com/iTowns/itowns/pull/671"},"issue":{"href":"https://api.github.com/repos/iTowns/itowns/issues/671"},"comments":{"href":"https://api.github.com/repos/iTowns/itowns/issues/671/comments"},"review_comments":{"href":"https://api.github.com/repos/iTowns/itowns/pulls/671/comments"},"review_comment":{"href":"https://api.github.com/repos/iTowns/itowns/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/iTowns/itowns/pulls/671/commits"},"statuses":{"href":"https://api.github.com/repos/iTowns/itowns/statuses/8083b0a946310ff1e3f91f0da05388687f4d4fab"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"autra"}}