{"action":"created","comment":{"url":"https://api.github.com/repos/valhalla/thor/pulls/comments/28687125","id":28687125,"diff_hunk":"@@ -225,15 +228,63 @@ int main(int argc, char *argv[]) {\n     return EXIT_SUCCESS;\n   }\n \n+  // Directions options\n+  // TODO - read options?\n+  DirectionsOptions directions_options;\n+  directions_options.set_units(\n+      DirectionsOptions::Units::DirectionsOptions_Units_kMiles);\n+  directions_options.set_language(\"en_US\");\n+\n+  Location originloc(PointLL { 0, 0 });\n+  Location destloc(PointLL { 0, 0 });\n   // argument checking and verification\n-  for (auto arg : std::vector<std::string> { \"origin\", \"destination\", \"type\",\n-      \"config\" }) {\n-    if (vm.count(arg) == 0) {\n-      std::cerr << \"The <\" << arg\n-                << \"> argument was not provided, but is mandatory\\n\\n\";\n-      std::cerr << options << \"\\n\";\n-      return EXIT_FAILURE;\n+  if (vm.count(\"json\") == 0) {\n+    for (auto arg : std::vector<std::string> { \"origin\", \"destination\", \"type\",\n+        \"config\" }) {\n+      if (vm.count(arg) == 0) {\n+        std::cerr << \"The <\" << arg\n+                  << \"> argument was not provided, but is mandatory when json is not provided\\n\\n\";\n+        std::cerr << options << \"\\n\";\n+        return EXIT_FAILURE;\n+      }\n+    }\n+    originloc = Location::FromCsv(origin);\n+    destloc = Location::FromCsv(destination);\n+  } else {\n+    std::cout << \"json=\" << json << std::endl;","path":"src/thor/pathtest/pathtest.cc","position":76,"original_position":76,"commit_id":"f615e1479ef743199371e1d847b4186572f92a91","original_commit_id":"f615e1479ef743199371e1d847b4186572f92a91","user":{"login":"kevinkreiser","id":697548,"avatar_url":"https://avatars.githubusercontent.com/u/697548?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinkreiser","html_url":"https://github.com/kevinkreiser","followers_url":"https://api.github.com/users/kevinkreiser/followers","following_url":"https://api.github.com/users/kevinkreiser/following{/other_user}","gists_url":"https://api.github.com/users/kevinkreiser/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinkreiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinkreiser/subscriptions","organizations_url":"https://api.github.com/users/kevinkreiser/orgs","repos_url":"https://api.github.com/users/kevinkreiser/repos","events_url":"https://api.github.com/users/kevinkreiser/events{/privacy}","received_events_url":"https://api.github.com/users/kevinkreiser/received_events","type":"User","site_admin":false},"body":"dont need this line i guess","created_at":"2015-04-20T13:22:08Z","updated_at":"2015-04-20T13:22:08Z","html_url":"https://github.com/valhalla/thor/pull/118#discussion_r28687125","pull_request_url":"https://api.github.com/repos/valhalla/thor/pulls/118","_links":{"self":{"href":"https://api.github.com/repos/valhalla/thor/pulls/comments/28687125"},"html":{"href":"https://github.com/valhalla/thor/pull/118#discussion_r28687125"},"pull_request":{"href":"https://api.github.com/repos/valhalla/thor/pulls/118"}}},"pull_request":{"url":"https://api.github.com/repos/valhalla/thor/pulls/118","id":33664051,"html_url":"https://github.com/valhalla/thor/pull/118","diff_url":"https://github.com/valhalla/thor/pull/118.diff","patch_url":"https://github.com/valhalla/thor/pull/118.patch","issue_url":"https://api.github.com/repos/valhalla/thor/issues/118","number":118,"state":"open","locked":false,"title":"Update to allow json input for locations","user":{"login":"dgearhart","id":7515853,"avatar_url":"https://avatars.githubusercontent.com/u/7515853?v=3","gravatar_id":"","url":"https://api.github.com/users/dgearhart","html_url":"https://github.com/dgearhart","followers_url":"https://api.github.com/users/dgearhart/followers","following_url":"https://api.github.com/users/dgearhart/following{/other_user}","gists_url":"https://api.github.com/users/dgearhart/gists{/gist_id}","starred_url":"https://api.github.com/users/dgearhart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgearhart/subscriptions","organizations_url":"https://api.github.com/users/dgearhart/orgs","repos_url":"https://api.github.com/users/dgearhart/repos","events_url":"https://api.github.com/users/dgearhart/events{/privacy}","received_events_url":"https://api.github.com/users/dgearhart/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-20T13:15:52Z","updated_at":"2015-04-20T13:22:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"24a09926bfcbf5c1824d39474d9a766b9998558a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/valhalla/thor/pulls/118/commits","review_comments_url":"https://api.github.com/repos/valhalla/thor/pulls/118/comments","review_comment_url":"https://api.github.com/repos/valhalla/thor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/valhalla/thor/issues/118/comments","statuses_url":"https://api.github.com/repos/valhalla/thor/statuses/f615e1479ef743199371e1d847b4186572f92a91","head":{"label":"valhalla:gdg","ref":"gdg","sha":"f615e1479ef743199371e1d847b4186572f92a91","user":{"login":"valhalla","id":10232331,"avatar_url":"https://avatars.githubusercontent.com/u/10232331?v=3","gravatar_id":"","url":"https://api.github.com/users/valhalla","html_url":"https://github.com/valhalla","followers_url":"https://api.github.com/users/valhalla/followers","following_url":"https://api.github.com/users/valhalla/following{/other_user}","gists_url":"https://api.github.com/users/valhalla/gists{/gist_id}","starred_url":"https://api.github.com/users/valhalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valhalla/subscriptions","organizations_url":"https://api.github.com/users/valhalla/orgs","repos_url":"https://api.github.com/users/valhalla/repos","events_url":"https://api.github.com/users/valhalla/events{/privacy}","received_events_url":"https://api.github.com/users/valhalla/received_events","type":"Organization","site_admin":false},"repo":{"id":28186592,"name":"thor","full_name":"valhalla/thor","owner":{"login":"valhalla","id":10232331,"avatar_url":"https://avatars.githubusercontent.com/u/10232331?v=3","gravatar_id":"","url":"https://api.github.com/users/valhalla","html_url":"https://github.com/valhalla","followers_url":"https://api.github.com/users/valhalla/followers","following_url":"https://api.github.com/users/valhalla/following{/other_user}","gists_url":"https://api.github.com/users/valhalla/gists{/gist_id}","starred_url":"https://api.github.com/users/valhalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valhalla/subscriptions","organizations_url":"https://api.github.com/users/valhalla/orgs","repos_url":"https://api.github.com/users/valhalla/repos","events_url":"https://api.github.com/users/valhalla/events{/privacy}","received_events_url":"https://api.github.com/users/valhalla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/valhalla/thor","description":"Tiled Hierarchical Open Routing - a routing engine backed by tiled open source routing data","fork":false,"url":"https://api.github.com/repos/valhalla/thor","forks_url":"https://api.github.com/repos/valhalla/thor/forks","keys_url":"https://api.github.com/repos/valhalla/thor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/valhalla/thor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/valhalla/thor/teams","hooks_url":"https://api.github.com/repos/valhalla/thor/hooks","issue_events_url":"https://api.github.com/repos/valhalla/thor/issues/events{/number}","events_url":"https://api.github.com/repos/valhalla/thor/events","assignees_url":"https://api.github.com/repos/valhalla/thor/assignees{/user}","branches_url":"https://api.github.com/repos/valhalla/thor/branches{/branch}","tags_url":"https://api.github.com/repos/valhalla/thor/tags","blobs_url":"https://api.github.com/repos/valhalla/thor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/valhalla/thor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/valhalla/thor/git/refs{/sha}","trees_url":"https://api.github.com/repos/valhalla/thor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/valhalla/thor/statuses/{sha}","languages_url":"https://api.github.com/repos/valhalla/thor/languages","stargazers_url":"https://api.github.com/repos/valhalla/thor/stargazers","contributors_url":"https://api.github.com/repos/valhalla/thor/contributors","subscribers_url":"https://api.github.com/repos/valhalla/thor/subscribers","subscription_url":"https://api.github.com/repos/valhalla/thor/subscription","commits_url":"https://api.github.com/repos/valhalla/thor/commits{/sha}","git_commits_url":"https://api.github.com/repos/valhalla/thor/git/commits{/sha}","comments_url":"https://api.github.com/repos/valhalla/thor/comments{/number}","issue_comment_url":"https://api.github.com/repos/valhalla/thor/issues/comments{/number}","contents_url":"https://api.github.com/repos/valhalla/thor/contents/{+path}","compare_url":"https://api.github.com/repos/valhalla/thor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/valhalla/thor/merges","archive_url":"https://api.github.com/repos/valhalla/thor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/valhalla/thor/downloads","issues_url":"https://api.github.com/repos/valhalla/thor/issues{/number}","pulls_url":"https://api.github.com/repos/valhalla/thor/pulls{/number}","milestones_url":"https://api.github.com/repos/valhalla/thor/milestones{/number}","notifications_url":"https://api.github.com/repos/valhalla/thor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/valhalla/thor/labels{/name}","releases_url":"https://api.github.com/repos/valhalla/thor/releases{/id}","created_at":"2014-12-18T14:25:42Z","updated_at":"2015-04-16T20:56:39Z","pushed_at":"2015-04-20T13:15:52Z","git_url":"git://github.com/valhalla/thor.git","ssh_url":"git@github.com:valhalla/thor.git","clone_url":"https://github.com/valhalla/thor.git","svn_url":"https://github.com/valhalla/thor","homepage":null,"size":3160,"stargazers_count":5,"watchers_count":5,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":5,"default_branch":"master"}},"base":{"label":"valhalla:master","ref":"master","sha":"273b0a2af63cea475ea3a6276ad0bb72eae4c5d1","user":{"login":"valhalla","id":10232331,"avatar_url":"https://avatars.githubusercontent.com/u/10232331?v=3","gravatar_id":"","url":"https://api.github.com/users/valhalla","html_url":"https://github.com/valhalla","followers_url":"https://api.github.com/users/valhalla/followers","following_url":"https://api.github.com/users/valhalla/following{/other_user}","gists_url":"https://api.github.com/users/valhalla/gists{/gist_id}","starred_url":"https://api.github.com/users/valhalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valhalla/subscriptions","organizations_url":"https://api.github.com/users/valhalla/orgs","repos_url":"https://api.github.com/users/valhalla/repos","events_url":"https://api.github.com/users/valhalla/events{/privacy}","received_events_url":"https://api.github.com/users/valhalla/received_events","type":"Organization","site_admin":false},"repo":{"id":28186592,"name":"thor","full_name":"valhalla/thor","owner":{"login":"valhalla","id":10232331,"avatar_url":"https://avatars.githubusercontent.com/u/10232331?v=3","gravatar_id":"","url":"https://api.github.com/users/valhalla","html_url":"https://github.com/valhalla","followers_url":"https://api.github.com/users/valhalla/followers","following_url":"https://api.github.com/users/valhalla/following{/other_user}","gists_url":"https://api.github.com/users/valhalla/gists{/gist_id}","starred_url":"https://api.github.com/users/valhalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valhalla/subscriptions","organizations_url":"https://api.github.com/users/valhalla/orgs","repos_url":"https://api.github.com/users/valhalla/repos","events_url":"https://api.github.com/users/valhalla/events{/privacy}","received_events_url":"https://api.github.com/users/valhalla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/valhalla/thor","description":"Tiled Hierarchical Open Routing - a routing engine backed by tiled open source routing data","fork":false,"url":"https://api.github.com/repos/valhalla/thor","forks_url":"https://api.github.com/repos/valhalla/thor/forks","keys_url":"https://api.github.com/repos/valhalla/thor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/valhalla/thor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/valhalla/thor/teams","hooks_url":"https://api.github.com/repos/valhalla/thor/hooks","issue_events_url":"https://api.github.com/repos/valhalla/thor/issues/events{/number}","events_url":"https://api.github.com/repos/valhalla/thor/events","assignees_url":"https://api.github.com/repos/valhalla/thor/assignees{/user}","branches_url":"https://api.github.com/repos/valhalla/thor/branches{/branch}","tags_url":"https://api.github.com/repos/valhalla/thor/tags","blobs_url":"https://api.github.com/repos/valhalla/thor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/valhalla/thor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/valhalla/thor/git/refs{/sha}","trees_url":"https://api.github.com/repos/valhalla/thor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/valhalla/thor/statuses/{sha}","languages_url":"https://api.github.com/repos/valhalla/thor/languages","stargazers_url":"https://api.github.com/repos/valhalla/thor/stargazers","contributors_url":"https://api.github.com/repos/valhalla/thor/contributors","subscribers_url":"https://api.github.com/repos/valhalla/thor/subscribers","subscription_url":"https://api.github.com/repos/valhalla/thor/subscription","commits_url":"https://api.github.com/repos/valhalla/thor/commits{/sha}","git_commits_url":"https://api.github.com/repos/valhalla/thor/git/commits{/sha}","comments_url":"https://api.github.com/repos/valhalla/thor/comments{/number}","issue_comment_url":"https://api.github.com/repos/valhalla/thor/issues/comments{/number}","contents_url":"https://api.github.com/repos/valhalla/thor/contents/{+path}","compare_url":"https://api.github.com/repos/valhalla/thor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/valhalla/thor/merges","archive_url":"https://api.github.com/repos/valhalla/thor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/valhalla/thor/downloads","issues_url":"https://api.github.com/repos/valhalla/thor/issues{/number}","pulls_url":"https://api.github.com/repos/valhalla/thor/pulls{/number}","milestones_url":"https://api.github.com/repos/valhalla/thor/milestones{/number}","notifications_url":"https://api.github.com/repos/valhalla/thor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/valhalla/thor/labels{/name}","releases_url":"https://api.github.com/repos/valhalla/thor/releases{/id}","created_at":"2014-12-18T14:25:42Z","updated_at":"2015-04-16T20:56:39Z","pushed_at":"2015-04-20T13:15:52Z","git_url":"git://github.com/valhalla/thor.git","ssh_url":"git@github.com:valhalla/thor.git","clone_url":"https://github.com/valhalla/thor.git","svn_url":"https://github.com/valhalla/thor","homepage":null,"size":3160,"stargazers_count":5,"watchers_count":5,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/valhalla/thor/pulls/118"},"html":{"href":"https://github.com/valhalla/thor/pull/118"},"issue":{"href":"https://api.github.com/repos/valhalla/thor/issues/118"},"comments":{"href":"https://api.github.com/repos/valhalla/thor/issues/118/comments"},"review_comments":{"href":"https://api.github.com/repos/valhalla/thor/pulls/118/comments"},"review_comment":{"href":"https://api.github.com/repos/valhalla/thor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/valhalla/thor/pulls/118/commits"},"statuses":{"href":"https://api.github.com/repos/valhalla/thor/statuses/f615e1479ef743199371e1d847b4186572f92a91"}}}}