{"action":"created","comment":{"url":"https://api.github.com/repos/azavea/nih-wayfinding/pulls/comments/23487290","id":23487290,"diff_hunk":"@@ -33,11 +33,38 @@\n             params.destination = destination;\n             return $http.post(directionsUrl, params, {});\n */\n-            return $timeout(function () {\n-                var res = RoutingResponseStub;\n-                TurnAmenities.attach(res);\n-                return res;\n-            }, 100, false);\n+            if (!(_.isArray(origin) && origin.length === 2)) {\n+                return;\n+            }\n+            if (!(_.isArray(destination) && destination.length === 2)) {\n+                return;\n+            }\n+            var now = new Date();\n+            // This is the minimum param list (+ toPlace,fromPlace) to make a OTP plan API call\n+            var defaults = {\n+                mode: 'WALK',\n+                time: now.getHours() + ':' + now.getMinutes(),\n+                date: defaultDate(),\n+                arriveBy: false,\n+                wheelchair: false,\n+                showIntermediateStops: false\n+            };\n+            var params = angular.extend({}, defaults, options);\n+            // Swap, OTP uses [lon,lat]","path":"src/nih_wayfinding/app/scripts/routing/directions-service.js","position":39,"original_position":39,"commit_id":"23f5ed95ad67cef88d4b6b0a6260b2df89f6f26e","original_commit_id":"23f5ed95ad67cef88d4b6b0a6260b2df89f6f26e","user":{"login":"flibbertigibbet","id":960264,"avatar_url":"https://avatars.githubusercontent.com/u/960264?v=3","gravatar_id":"","url":"https://api.github.com/users/flibbertigibbet","html_url":"https://github.com/flibbertigibbet","followers_url":"https://api.github.com/users/flibbertigibbet/followers","following_url":"https://api.github.com/users/flibbertigibbet/following{/other_user}","gists_url":"https://api.github.com/users/flibbertigibbet/gists{/gist_id}","starred_url":"https://api.github.com/users/flibbertigibbet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flibbertigibbet/subscriptions","organizations_url":"https://api.github.com/users/flibbertigibbet/orgs","repos_url":"https://api.github.com/users/flibbertigibbet/repos","events_url":"https://api.github.com/users/flibbertigibbet/events{/privacy}","received_events_url":"https://api.github.com/users/flibbertigibbet/received_events","type":"User","site_admin":false},"body":"Maybe it would make more sense to store as [lon, lat], since both OTP and GeoJSON use that format.","created_at":"2015-01-23T23:06:05Z","updated_at":"2015-01-23T23:06:05Z","html_url":"https://github.com/azavea/nih-wayfinding/pull/53#discussion_r23487290","pull_request_url":"https://api.github.com/repos/azavea/nih-wayfinding/pulls/53","_links":{"self":{"href":"https://api.github.com/repos/azavea/nih-wayfinding/pulls/comments/23487290"},"html":{"href":"https://github.com/azavea/nih-wayfinding/pull/53#discussion_r23487290"},"pull_request":{"href":"https://api.github.com/repos/azavea/nih-wayfinding/pulls/53"}}},"pull_request":{"url":"https://api.github.com/repos/azavea/nih-wayfinding/pulls/53","id":27962327,"html_url":"https://github.com/azavea/nih-wayfinding/pull/53","diff_url":"https://github.com/azavea/nih-wayfinding/pull/53.diff","patch_url":"https://github.com/azavea/nih-wayfinding/pull/53.patch","issue_url":"https://api.github.com/repos/azavea/nih-wayfinding/issues/53","number":53,"state":"open","locked":false,"title":"Transform OTP response to NIH response","user":{"login":"CloudNiner","id":1818302,"avatar_url":"https://avatars.githubusercontent.com/u/1818302?v=3","gravatar_id":"","url":"https://api.github.com/users/CloudNiner","html_url":"https://github.com/CloudNiner","followers_url":"https://api.github.com/users/CloudNiner/followers","following_url":"https://api.github.com/users/CloudNiner/following{/other_user}","gists_url":"https://api.github.com/users/CloudNiner/gists{/gist_id}","starred_url":"https://api.github.com/users/CloudNiner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CloudNiner/subscriptions","organizations_url":"https://api.github.com/users/CloudNiner/orgs","repos_url":"https://api.github.com/users/CloudNiner/repos","events_url":"https://api.github.com/users/CloudNiner/events{/privacy}","received_events_url":"https://api.github.com/users/CloudNiner/received_events","type":"User","site_admin":false},"body":"Few things left to do, but this is close. Wanted to get it up for review before I finish the remaining tasks, which include:\r\n\r\n- Improve directions text string\r\n- Handle remaining OTP direction types\r\n- Consider how to handle points of interest along route (the Point features from the stubbed response don't exist)\r\n- Verify functionality of navigation views\r\n- TESTS!","created_at":"2015-01-23T22:53:16Z","updated_at":"2015-01-23T23:06:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"680f997900624369825d44d85058b419dcbd0cbe","assignee":{"login":"flibbertigibbet","id":960264,"avatar_url":"https://avatars.githubusercontent.com/u/960264?v=3","gravatar_id":"","url":"https://api.github.com/users/flibbertigibbet","html_url":"https://github.com/flibbertigibbet","followers_url":"https://api.github.com/users/flibbertigibbet/followers","following_url":"https://api.github.com/users/flibbertigibbet/following{/other_user}","gists_url":"https://api.github.com/users/flibbertigibbet/gists{/gist_id}","starred_url":"https://api.github.com/users/flibbertigibbet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flibbertigibbet/subscriptions","organizations_url":"https://api.github.com/users/flibbertigibbet/orgs","repos_url":"https://api.github.com/users/flibbertigibbet/repos","events_url":"https://api.github.com/users/flibbertigibbet/events{/privacy}","received_events_url":"https://api.github.com/users/flibbertigibbet/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/azavea/nih-wayfinding/pulls/53/commits","review_comments_url":"https://api.github.com/repos/azavea/nih-wayfinding/pulls/53/comments","review_comment_url":"https://api.github.com/repos/azavea/nih-wayfinding/pulls/comments/{number}","comments_url":"https://api.github.com/repos/azavea/nih-wayfinding/issues/53/comments","statuses_url":"https://api.github.com/repos/azavea/nih-wayfinding/statuses/23f5ed95ad67cef88d4b6b0a6260b2df89f6f26e","head":{"label":"CloudNiner:feature/opentripplanner-route-response","ref":"feature/opentripplanner-route-response","sha":"23f5ed95ad67cef88d4b6b0a6260b2df89f6f26e","user":{"login":"CloudNiner","id":1818302,"avatar_url":"https://avatars.githubusercontent.com/u/1818302?v=3","gravatar_id":"","url":"https://api.github.com/users/CloudNiner","html_url":"https://github.com/CloudNiner","followers_url":"https://api.github.com/users/CloudNiner/followers","following_url":"https://api.github.com/users/CloudNiner/following{/other_user}","gists_url":"https://api.github.com/users/CloudNiner/gists{/gist_id}","starred_url":"https://api.github.com/users/CloudNiner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CloudNiner/subscriptions","organizations_url":"https://api.github.com/users/CloudNiner/orgs","repos_url":"https://api.github.com/users/CloudNiner/repos","events_url":"https://api.github.com/users/CloudNiner/events{/privacy}","received_events_url":"https://api.github.com/users/CloudNiner/received_events","type":"User","site_admin":false},"repo":{"id":28818168,"name":"nih-wayfinding","full_name":"CloudNiner/nih-wayfinding","owner":{"login":"CloudNiner","id":1818302,"avatar_url":"https://avatars.githubusercontent.com/u/1818302?v=3","gravatar_id":"","url":"https://api.github.com/users/CloudNiner","html_url":"https://github.com/CloudNiner","followers_url":"https://api.github.com/users/CloudNiner/followers","following_url":"https://api.github.com/users/CloudNiner/following{/other_user}","gists_url":"https://api.github.com/users/CloudNiner/gists{/gist_id}","starred_url":"https://api.github.com/users/CloudNiner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CloudNiner/subscriptions","organizations_url":"https://api.github.com/users/CloudNiner/orgs","repos_url":"https://api.github.com/users/CloudNiner/repos","events_url":"https://api.github.com/users/CloudNiner/events{/privacy}","received_events_url":"https://api.github.com/users/CloudNiner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/CloudNiner/nih-wayfinding","description":"NIH Wayfinding Tools (Prototype)","fork":true,"url":"https://api.github.com/repos/CloudNiner/nih-wayfinding","forks_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/forks","keys_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/teams","hooks_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/hooks","issue_events_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/issues/events{/number}","events_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/events","assignees_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/assignees{/user}","branches_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/branches{/branch}","tags_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/tags","blobs_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/git/refs{/sha}","trees_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/statuses/{sha}","languages_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/languages","stargazers_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/stargazers","contributors_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/contributors","subscribers_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/subscribers","subscription_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/subscription","commits_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/commits{/sha}","git_commits_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/git/commits{/sha}","comments_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/comments{/number}","issue_comment_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/issues/comments/{number}","contents_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/contents/{+path}","compare_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/merges","archive_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/downloads","issues_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/issues{/number}","pulls_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/pulls{/number}","milestones_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/milestones{/number}","notifications_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/labels{/name}","releases_url":"https://api.github.com/repos/CloudNiner/nih-wayfinding/releases{/id}","created_at":"2015-01-05T15:24:11Z","updated_at":"2015-01-02T16:11:24Z","pushed_at":"2015-01-23T22:53:06Z","git_url":"git://github.com/CloudNiner/nih-wayfinding.git","ssh_url":"git@github.com:CloudNiner/nih-wayfinding.git","clone_url":"https://github.com/CloudNiner/nih-wayfinding.git","svn_url":"https://github.com/CloudNiner/nih-wayfinding","homepage":null,"size":492,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"azavea:develop","ref":"develop","sha":"c9867673ca56b5d7d7daaf80e4b92bc80ffa134f","user":{"login":"azavea","id":595231,"avatar_url":"https://avatars.githubusercontent.com/u/595231?v=3","gravatar_id":"","url":"https://api.github.com/users/azavea","html_url":"https://github.com/azavea","followers_url":"https://api.github.com/users/azavea/followers","following_url":"https://api.github.com/users/azavea/following{/other_user}","gists_url":"https://api.github.com/users/azavea/gists{/gist_id}","starred_url":"https://api.github.com/users/azavea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azavea/subscriptions","organizations_url":"https://api.github.com/users/azavea/orgs","repos_url":"https://api.github.com/users/azavea/repos","events_url":"https://api.github.com/users/azavea/events{/privacy}","received_events_url":"https://api.github.com/users/azavea/received_events","type":"Organization","site_admin":false},"repo":{"id":28718313,"name":"nih-wayfinding","full_name":"azavea/nih-wayfinding","owner":{"login":"azavea","id":595231,"avatar_url":"https://avatars.githubusercontent.com/u/595231?v=3","gravatar_id":"","url":"https://api.github.com/users/azavea","html_url":"https://github.com/azavea","followers_url":"https://api.github.com/users/azavea/followers","following_url":"https://api.github.com/users/azavea/following{/other_user}","gists_url":"https://api.github.com/users/azavea/gists{/gist_id}","starred_url":"https://api.github.com/users/azavea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azavea/subscriptions","organizations_url":"https://api.github.com/users/azavea/orgs","repos_url":"https://api.github.com/users/azavea/repos","events_url":"https://api.github.com/users/azavea/events{/privacy}","received_events_url":"https://api.github.com/users/azavea/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/azavea/nih-wayfinding","description":"NIH Wayfinding Tools (Prototype)","fork":false,"url":"https://api.github.com/repos/azavea/nih-wayfinding","forks_url":"https://api.github.com/repos/azavea/nih-wayfinding/forks","keys_url":"https://api.github.com/repos/azavea/nih-wayfinding/keys{/key_id}","collaborators_url":"https://api.github.com/repos/azavea/nih-wayfinding/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/azavea/nih-wayfinding/teams","hooks_url":"https://api.github.com/repos/azavea/nih-wayfinding/hooks","issue_events_url":"https://api.github.com/repos/azavea/nih-wayfinding/issues/events{/number}","events_url":"https://api.github.com/repos/azavea/nih-wayfinding/events","assignees_url":"https://api.github.com/repos/azavea/nih-wayfinding/assignees{/user}","branches_url":"https://api.github.com/repos/azavea/nih-wayfinding/branches{/branch}","tags_url":"https://api.github.com/repos/azavea/nih-wayfinding/tags","blobs_url":"https://api.github.com/repos/azavea/nih-wayfinding/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/azavea/nih-wayfinding/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/azavea/nih-wayfinding/git/refs{/sha}","trees_url":"https://api.github.com/repos/azavea/nih-wayfinding/git/trees{/sha}","statuses_url":"https://api.github.com/repos/azavea/nih-wayfinding/statuses/{sha}","languages_url":"https://api.github.com/repos/azavea/nih-wayfinding/languages","stargazers_url":"https://api.github.com/repos/azavea/nih-wayfinding/stargazers","contributors_url":"https://api.github.com/repos/azavea/nih-wayfinding/contributors","subscribers_url":"https://api.github.com/repos/azavea/nih-wayfinding/subscribers","subscription_url":"https://api.github.com/repos/azavea/nih-wayfinding/subscription","commits_url":"https://api.github.com/repos/azavea/nih-wayfinding/commits{/sha}","git_commits_url":"https://api.github.com/repos/azavea/nih-wayfinding/git/commits{/sha}","comments_url":"https://api.github.com/repos/azavea/nih-wayfinding/comments{/number}","issue_comment_url":"https://api.github.com/repos/azavea/nih-wayfinding/issues/comments/{number}","contents_url":"https://api.github.com/repos/azavea/nih-wayfinding/contents/{+path}","compare_url":"https://api.github.com/repos/azavea/nih-wayfinding/compare/{base}...{head}","merges_url":"https://api.github.com/repos/azavea/nih-wayfinding/merges","archive_url":"https://api.github.com/repos/azavea/nih-wayfinding/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/azavea/nih-wayfinding/downloads","issues_url":"https://api.github.com/repos/azavea/nih-wayfinding/issues{/number}","pulls_url":"https://api.github.com/repos/azavea/nih-wayfinding/pulls{/number}","milestones_url":"https://api.github.com/repos/azavea/nih-wayfinding/milestones{/number}","notifications_url":"https://api.github.com/repos/azavea/nih-wayfinding/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/azavea/nih-wayfinding/labels{/name}","releases_url":"https://api.github.com/repos/azavea/nih-wayfinding/releases{/id}","created_at":"2015-01-02T16:11:24Z","updated_at":"2015-01-23T18:32:08Z","pushed_at":"2015-01-23T18:32:08Z","git_url":"git://github.com/azavea/nih-wayfinding.git","ssh_url":"git@github.com:azavea/nih-wayfinding.git","clone_url":"https://github.com/azavea/nih-wayfinding.git","svn_url":"https://github.com/azavea/nih-wayfinding","homepage":null,"size":1390,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/azavea/nih-wayfinding/pulls/53"},"html":{"href":"https://github.com/azavea/nih-wayfinding/pull/53"},"issue":{"href":"https://api.github.com/repos/azavea/nih-wayfinding/issues/53"},"comments":{"href":"https://api.github.com/repos/azavea/nih-wayfinding/issues/53/comments"},"review_comments":{"href":"https://api.github.com/repos/azavea/nih-wayfinding/pulls/53/comments"},"review_comment":{"href":"https://api.github.com/repos/azavea/nih-wayfinding/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/azavea/nih-wayfinding/pulls/53/commits"},"statuses":{"href":"https://api.github.com/repos/azavea/nih-wayfinding/statuses/23f5ed95ad67cef88d4b6b0a6260b2df89f6f26e"}}}}