{"action":"created","comment":{"url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/pulls/comments/40013260","id":40013260,"diff_hunk":"@@ -0,0 +1,72 @@\n+﻿using RestSharp;\n+using RoutesAndTimetables.Business.DataObjects;\n+using System;\n+using System.Collections.Generic;\n+using System.Linq;\n+using System.Text;\n+using System.Threading.Tasks;\n+\n+namespace RoutesAndTimetables.Business.Services\n+{\n+    public class RoutesService\n+    {\n+        private RestClient client;\n+\n+        public RoutesService()\n+        {\n+            client = new RestClient(@\"https://api.appglu.com/v1/queries/\");\n+            client.Authenticator = new RestSharp.Authenticators.HttpBasicAuthenticator(\"WKD4N7YMA1uiM8V\", \"DtdTtzMLQlA0hk2C1Yi5pLyVIlAQ68\");\n+        }\n+        private void AddHeaders(RestRequest request)\n+        {\n+            request.AddHeader(\"X-AppGlu-Environment\", \"staging\");\n+            request.AddHeader(\"Content-Type\", \"application/json\");\n+            request.AddHeader(\"Cache-Control\", \"no-cache\");\n+        }\n+\n+        public async Task<List<Route>> GetRoutes(string stopName = \"\")\n+        {\n+            RestRequest request = new RestRequest(\"findRoutesByStopName/run\");","path":"RoutesAndTimetables/RoutesAndTimetables.Business/Services/RoutesService.cs","position":29,"original_position":29,"commit_id":"69c3f90a98380e240427e2afcfd4669437b43f3c","original_commit_id":"69c3f90a98380e240427e2afcfd4669437b43f3c","user":{"login":"arctouch-pedrolima","id":6862048,"avatar_url":"https://avatars.githubusercontent.com/u/6862048?v=3","gravatar_id":"","url":"https://api.github.com/users/arctouch-pedrolima","html_url":"https://github.com/arctouch-pedrolima","followers_url":"https://api.github.com/users/arctouch-pedrolima/followers","following_url":"https://api.github.com/users/arctouch-pedrolima/following{/other_user}","gists_url":"https://api.github.com/users/arctouch-pedrolima/gists{/gist_id}","starred_url":"https://api.github.com/users/arctouch-pedrolima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arctouch-pedrolima/subscriptions","organizations_url":"https://api.github.com/users/arctouch-pedrolima/orgs","repos_url":"https://api.github.com/users/arctouch-pedrolima/repos","events_url":"https://api.github.com/users/arctouch-pedrolima/events{/privacy}","received_events_url":"https://api.github.com/users/arctouch-pedrolima/received_events","type":"User","site_admin":false},"body":"It's better practice to have constants for all strings floating around","created_at":"2015-09-21T19:19:29Z","updated_at":"2015-09-21T19:19:29Z","html_url":"https://github.com/ThiagoBerti/RoutesAndTimetables/pull/1#discussion_r40013260","pull_request_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/pulls/comments/40013260"},"html":{"href":"https://github.com/ThiagoBerti/RoutesAndTimetables/pull/1#discussion_r40013260"},"pull_request":{"href":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/pulls/1","id":45497532,"html_url":"https://github.com/ThiagoBerti/RoutesAndTimetables/pull/1","diff_url":"https://github.com/ThiagoBerti/RoutesAndTimetables/pull/1.diff","patch_url":"https://github.com/ThiagoBerti/RoutesAndTimetables/pull/1.patch","issue_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/issues/1","number":1,"state":"open","locked":false,"title":"Dev","user":{"login":"ThiagoBerti","id":1470865,"avatar_url":"https://avatars.githubusercontent.com/u/1470865?v=3","gravatar_id":"","url":"https://api.github.com/users/ThiagoBerti","html_url":"https://github.com/ThiagoBerti","followers_url":"https://api.github.com/users/ThiagoBerti/followers","following_url":"https://api.github.com/users/ThiagoBerti/following{/other_user}","gists_url":"https://api.github.com/users/ThiagoBerti/gists{/gist_id}","starred_url":"https://api.github.com/users/ThiagoBerti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThiagoBerti/subscriptions","organizations_url":"https://api.github.com/users/ThiagoBerti/orgs","repos_url":"https://api.github.com/users/ThiagoBerti/repos","events_url":"https://api.github.com/users/ThiagoBerti/events{/privacy}","received_events_url":"https://api.github.com/users/ThiagoBerti/received_events","type":"User","site_admin":false},"body":"Development for the Routes And Timetables app for the interview","created_at":"2015-09-20T14:45:39Z","updated_at":"2015-09-21T19:19:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a57836952270f02917618c1db878f31c9e36b791","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/pulls/1/commits","review_comments_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/pulls/1/comments","review_comment_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/issues/1/comments","statuses_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/statuses/69c3f90a98380e240427e2afcfd4669437b43f3c","head":{"label":"ThiagoBerti:Dev","ref":"Dev","sha":"69c3f90a98380e240427e2afcfd4669437b43f3c","user":{"login":"ThiagoBerti","id":1470865,"avatar_url":"https://avatars.githubusercontent.com/u/1470865?v=3","gravatar_id":"","url":"https://api.github.com/users/ThiagoBerti","html_url":"https://github.com/ThiagoBerti","followers_url":"https://api.github.com/users/ThiagoBerti/followers","following_url":"https://api.github.com/users/ThiagoBerti/following{/other_user}","gists_url":"https://api.github.com/users/ThiagoBerti/gists{/gist_id}","starred_url":"https://api.github.com/users/ThiagoBerti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThiagoBerti/subscriptions","organizations_url":"https://api.github.com/users/ThiagoBerti/orgs","repos_url":"https://api.github.com/users/ThiagoBerti/repos","events_url":"https://api.github.com/users/ThiagoBerti/events{/privacy}","received_events_url":"https://api.github.com/users/ThiagoBerti/received_events","type":"User","site_admin":false},"repo":{"id":42775342,"name":"RoutesAndTimetables","full_name":"ThiagoBerti/RoutesAndTimetables","owner":{"login":"ThiagoBerti","id":1470865,"avatar_url":"https://avatars.githubusercontent.com/u/1470865?v=3","gravatar_id":"","url":"https://api.github.com/users/ThiagoBerti","html_url":"https://github.com/ThiagoBerti","followers_url":"https://api.github.com/users/ThiagoBerti/followers","following_url":"https://api.github.com/users/ThiagoBerti/following{/other_user}","gists_url":"https://api.github.com/users/ThiagoBerti/gists{/gist_id}","starred_url":"https://api.github.com/users/ThiagoBerti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThiagoBerti/subscriptions","organizations_url":"https://api.github.com/users/ThiagoBerti/orgs","repos_url":"https://api.github.com/users/ThiagoBerti/repos","events_url":"https://api.github.com/users/ThiagoBerti/events{/privacy}","received_events_url":"https://api.github.com/users/ThiagoBerti/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ThiagoBerti/RoutesAndTimetables","description":"RoutesAndTimetables","fork":false,"url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables","forks_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/forks","keys_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/teams","hooks_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/hooks","issue_events_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/issues/events{/number}","events_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/events","assignees_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/assignees{/user}","branches_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/branches{/branch}","tags_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/tags","blobs_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/git/refs{/sha}","trees_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/statuses/{sha}","languages_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/languages","stargazers_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/stargazers","contributors_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/contributors","subscribers_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/subscribers","subscription_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/subscription","commits_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/commits{/sha}","git_commits_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/git/commits{/sha}","comments_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/comments{/number}","issue_comment_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/issues/comments{/number}","contents_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/contents/{+path}","compare_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/merges","archive_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/downloads","issues_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/issues{/number}","pulls_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/pulls{/number}","milestones_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/milestones{/number}","notifications_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/labels{/name}","releases_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/releases{/id}","created_at":"2015-09-19T14:08:12Z","updated_at":"2015-09-19T14:08:12Z","pushed_at":"2015-09-20T14:45:39Z","git_url":"git://github.com/ThiagoBerti/RoutesAndTimetables.git","ssh_url":"git@github.com:ThiagoBerti/RoutesAndTimetables.git","clone_url":"https://github.com/ThiagoBerti/RoutesAndTimetables.git","svn_url":"https://github.com/ThiagoBerti/RoutesAndTimetables","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"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":0,"default_branch":"master"}},"base":{"label":"ThiagoBerti:master","ref":"master","sha":"b5a3379ccd30536b35eda132f19de768cd8ae8ee","user":{"login":"ThiagoBerti","id":1470865,"avatar_url":"https://avatars.githubusercontent.com/u/1470865?v=3","gravatar_id":"","url":"https://api.github.com/users/ThiagoBerti","html_url":"https://github.com/ThiagoBerti","followers_url":"https://api.github.com/users/ThiagoBerti/followers","following_url":"https://api.github.com/users/ThiagoBerti/following{/other_user}","gists_url":"https://api.github.com/users/ThiagoBerti/gists{/gist_id}","starred_url":"https://api.github.com/users/ThiagoBerti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThiagoBerti/subscriptions","organizations_url":"https://api.github.com/users/ThiagoBerti/orgs","repos_url":"https://api.github.com/users/ThiagoBerti/repos","events_url":"https://api.github.com/users/ThiagoBerti/events{/privacy}","received_events_url":"https://api.github.com/users/ThiagoBerti/received_events","type":"User","site_admin":false},"repo":{"id":42775342,"name":"RoutesAndTimetables","full_name":"ThiagoBerti/RoutesAndTimetables","owner":{"login":"ThiagoBerti","id":1470865,"avatar_url":"https://avatars.githubusercontent.com/u/1470865?v=3","gravatar_id":"","url":"https://api.github.com/users/ThiagoBerti","html_url":"https://github.com/ThiagoBerti","followers_url":"https://api.github.com/users/ThiagoBerti/followers","following_url":"https://api.github.com/users/ThiagoBerti/following{/other_user}","gists_url":"https://api.github.com/users/ThiagoBerti/gists{/gist_id}","starred_url":"https://api.github.com/users/ThiagoBerti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThiagoBerti/subscriptions","organizations_url":"https://api.github.com/users/ThiagoBerti/orgs","repos_url":"https://api.github.com/users/ThiagoBerti/repos","events_url":"https://api.github.com/users/ThiagoBerti/events{/privacy}","received_events_url":"https://api.github.com/users/ThiagoBerti/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ThiagoBerti/RoutesAndTimetables","description":"RoutesAndTimetables","fork":false,"url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables","forks_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/forks","keys_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/teams","hooks_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/hooks","issue_events_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/issues/events{/number}","events_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/events","assignees_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/assignees{/user}","branches_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/branches{/branch}","tags_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/tags","blobs_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/git/refs{/sha}","trees_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/statuses/{sha}","languages_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/languages","stargazers_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/stargazers","contributors_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/contributors","subscribers_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/subscribers","subscription_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/subscription","commits_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/commits{/sha}","git_commits_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/git/commits{/sha}","comments_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/comments{/number}","issue_comment_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/issues/comments{/number}","contents_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/contents/{+path}","compare_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/merges","archive_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/downloads","issues_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/issues{/number}","pulls_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/pulls{/number}","milestones_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/milestones{/number}","notifications_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/labels{/name}","releases_url":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/releases{/id}","created_at":"2015-09-19T14:08:12Z","updated_at":"2015-09-19T14:08:12Z","pushed_at":"2015-09-20T14:45:39Z","git_url":"git://github.com/ThiagoBerti/RoutesAndTimetables.git","ssh_url":"git@github.com:ThiagoBerti/RoutesAndTimetables.git","clone_url":"https://github.com/ThiagoBerti/RoutesAndTimetables.git","svn_url":"https://github.com/ThiagoBerti/RoutesAndTimetables","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"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":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/pulls/1"},"html":{"href":"https://github.com/ThiagoBerti/RoutesAndTimetables/pull/1"},"issue":{"href":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/issues/1"},"comments":{"href":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/ThiagoBerti/RoutesAndTimetables/statuses/69c3f90a98380e240427e2afcfd4669437b43f3c"}}}}