{"action":"created","comment":{"url":"https://api.github.com/repos/osu-mist/locations-frontend-api/pulls/comments/49153561","id":49153561,"diff_hunk":"@@ -0,0 +1,261 @@\n+package edu.oregonstate.mist.locations.frontend.resources\n+\n+import com.codahale.metrics.annotation.Timed\n+import com.fasterxml.jackson.databind.ObjectMapper\n+import edu.oregonstate.mist.api.AuthenticatedUser\n+import io.dropwizard.auth.Auth\n+import org.slf4j.Logger\n+import org.slf4j.LoggerFactory\n+\n+import javax.ws.rs.GET\n+import javax.ws.rs.Path\n+import javax.ws.rs.PathParam\n+import javax.ws.rs.Produces\n+import javax.ws.rs.QueryParam\n+import javax.ws.rs.WebApplicationException\n+import javax.ws.rs.core.Context\n+import javax.ws.rs.core.MediaType\n+import javax.ws.rs.core.MultivaluedMap\n+import javax.ws.rs.core.Response\n+import javax.ws.rs.core.UriInfo\n+import java.util.regex.Pattern\n+\n+@Path(\"/locations\")\n+@Produces(MediaType.APPLICATION_JSON)\n+class LocationResource {\n+    private static final Logger LOGGER = LoggerFactory.getLogger(LocationResource.class)\n+    public static final ArrayList<String> ALLOWED_CAMPUSES = [\"corvallis\"]\n+    public static final ArrayList<String> ALLOWED_TYPES = [\"building\", \"dining\"]\n+\n+    /**\n+     * Default page number used in pagination\n+     * @todo: should this be coming from skeleton or configuration file?\n+     */\n+    public static final Integer DEFAULT_PAGE_NUMBER = 1\n+\n+    /**\n+     * Default page size used in pagination\n+     * @todo: should this be coming from skeleton or configuration file?\n+     */\n+    public static final Integer DEFAULT_PAGE_SIZE = 10","path":"src/main/groovy/edu/oregonstate/mist/locations/frontend/resources/LocationResource.groovy","position":40,"original_position":40,"commit_id":"9fd04baff263df8b0cbe0daf4d9c3e071b749be1","original_commit_id":"9fd04baff263df8b0cbe0daf4d9c3e071b749be1","user":{"login":"floppyears","id":273918,"avatar_url":"https://avatars.githubusercontent.com/u/273918?v=3","gravatar_id":"","url":"https://api.github.com/users/floppyears","html_url":"https://github.com/floppyears","followers_url":"https://api.github.com/users/floppyears/followers","following_url":"https://api.github.com/users/floppyears/following{/other_user}","gists_url":"https://api.github.com/users/floppyears/gists{/gist_id}","starred_url":"https://api.github.com/users/floppyears/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floppyears/subscriptions","organizations_url":"https://api.github.com/users/floppyears/orgs","repos_url":"https://api.github.com/users/floppyears/repos","events_url":"https://api.github.com/users/floppyears/events{/privacy}","received_events_url":"https://api.github.com/users/floppyears/received_events","type":"User","site_admin":false},"body":"This is something we'll probably focus on during a future sprint since it is code refactoring / clean up and not affecting functionality.","created_at":"2016-01-08T02:38:46Z","updated_at":"2016-01-08T02:38:46Z","html_url":"https://github.com/osu-mist/locations-frontend-api/pull/3#discussion_r49153561","pull_request_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/osu-mist/locations-frontend-api/pulls/comments/49153561"},"html":{"href":"https://github.com/osu-mist/locations-frontend-api/pull/3#discussion_r49153561"},"pull_request":{"href":"https://api.github.com/repos/osu-mist/locations-frontend-api/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/osu-mist/locations-frontend-api/pulls/3","id":55382816,"html_url":"https://github.com/osu-mist/locations-frontend-api/pull/3","diff_url":"https://github.com/osu-mist/locations-frontend-api/pull/3.diff","patch_url":"https://github.com/osu-mist/locations-frontend-api/pull/3.patch","issue_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/issues/3","number":3,"state":"open","locked":false,"title":"list / search locations","user":{"login":"floppyears","id":273918,"avatar_url":"https://avatars.githubusercontent.com/u/273918?v=3","gravatar_id":"","url":"https://api.github.com/users/floppyears","html_url":"https://github.com/floppyears","followers_url":"https://api.github.com/users/floppyears/followers","following_url":"https://api.github.com/users/floppyears/following{/other_user}","gists_url":"https://api.github.com/users/floppyears/gists{/gist_id}","starred_url":"https://api.github.com/users/floppyears/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floppyears/subscriptions","organizations_url":"https://api.github.com/users/floppyears/orgs","repos_url":"https://api.github.com/users/floppyears/repos","events_url":"https://api.github.com/users/floppyears/events{/privacy}","received_events_url":"https://api.github.com/users/floppyears/received_events","type":"User","site_admin":false},"body":"These commits allow the user to use full text search for locations and filter locations by campus or type.","created_at":"2016-01-07T19:59:35Z","updated_at":"2016-01-08T02:38:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"20c7de7658a5f3c0799b378d4c2eeb11ac75bf02","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/pulls/3/commits","review_comments_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/pulls/3/comments","review_comment_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/issues/3/comments","statuses_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/statuses/9fd04baff263df8b0cbe0daf4d9c3e071b749be1","head":{"label":"osu-mist:feature/CO-297-list-locations","ref":"feature/CO-297-list-locations","sha":"9fd04baff263df8b0cbe0daf4d9c3e071b749be1","user":{"login":"osu-mist","id":6473936,"avatar_url":"https://avatars.githubusercontent.com/u/6473936?v=3","gravatar_id":"","url":"https://api.github.com/users/osu-mist","html_url":"https://github.com/osu-mist","followers_url":"https://api.github.com/users/osu-mist/followers","following_url":"https://api.github.com/users/osu-mist/following{/other_user}","gists_url":"https://api.github.com/users/osu-mist/gists{/gist_id}","starred_url":"https://api.github.com/users/osu-mist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osu-mist/subscriptions","organizations_url":"https://api.github.com/users/osu-mist/orgs","repos_url":"https://api.github.com/users/osu-mist/repos","events_url":"https://api.github.com/users/osu-mist/events{/privacy}","received_events_url":"https://api.github.com/users/osu-mist/received_events","type":"Organization","site_admin":false},"repo":{"id":49225651,"name":"locations-frontend-api","full_name":"osu-mist/locations-frontend-api","owner":{"login":"osu-mist","id":6473936,"avatar_url":"https://avatars.githubusercontent.com/u/6473936?v=3","gravatar_id":"","url":"https://api.github.com/users/osu-mist","html_url":"https://github.com/osu-mist","followers_url":"https://api.github.com/users/osu-mist/followers","following_url":"https://api.github.com/users/osu-mist/following{/other_user}","gists_url":"https://api.github.com/users/osu-mist/gists{/gist_id}","starred_url":"https://api.github.com/users/osu-mist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osu-mist/subscriptions","organizations_url":"https://api.github.com/users/osu-mist/orgs","repos_url":"https://api.github.com/users/osu-mist/repos","events_url":"https://api.github.com/users/osu-mist/events{/privacy}","received_events_url":"https://api.github.com/users/osu-mist/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/osu-mist/locations-frontend-api","description":"Locations API frontend that consumes data from elasticsearch.","fork":false,"url":"https://api.github.com/repos/osu-mist/locations-frontend-api","forks_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/forks","keys_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/teams","hooks_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/hooks","issue_events_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/issues/events{/number}","events_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/events","assignees_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/assignees{/user}","branches_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/branches{/branch}","tags_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/tags","blobs_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/statuses/{sha}","languages_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/languages","stargazers_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/stargazers","contributors_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/contributors","subscribers_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/subscribers","subscription_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/subscription","commits_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/contents/{+path}","compare_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/merges","archive_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/downloads","issues_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/issues{/number}","pulls_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/pulls{/number}","milestones_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/milestones{/number}","notifications_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/labels{/name}","releases_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/releases{/id}","created_at":"2016-01-07T19:26:25Z","updated_at":"2016-01-07T19:31:25Z","pushed_at":"2016-01-08T02:04:12Z","git_url":"git://github.com/osu-mist/locations-frontend-api.git","ssh_url":"git@github.com:osu-mist/locations-frontend-api.git","clone_url":"https://github.com/osu-mist/locations-frontend-api.git","svn_url":"https://github.com/osu-mist/locations-frontend-api","homepage":null,"size":141,"stargazers_count":0,"watchers_count":0,"language":"Groovy","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"feature/CO-297-list-locations"}},"base":{"label":"osu-mist:develop","ref":"develop","sha":"24e44faa46c76dce51c9d665161700afd0211a7e","user":{"login":"osu-mist","id":6473936,"avatar_url":"https://avatars.githubusercontent.com/u/6473936?v=3","gravatar_id":"","url":"https://api.github.com/users/osu-mist","html_url":"https://github.com/osu-mist","followers_url":"https://api.github.com/users/osu-mist/followers","following_url":"https://api.github.com/users/osu-mist/following{/other_user}","gists_url":"https://api.github.com/users/osu-mist/gists{/gist_id}","starred_url":"https://api.github.com/users/osu-mist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osu-mist/subscriptions","organizations_url":"https://api.github.com/users/osu-mist/orgs","repos_url":"https://api.github.com/users/osu-mist/repos","events_url":"https://api.github.com/users/osu-mist/events{/privacy}","received_events_url":"https://api.github.com/users/osu-mist/received_events","type":"Organization","site_admin":false},"repo":{"id":49225651,"name":"locations-frontend-api","full_name":"osu-mist/locations-frontend-api","owner":{"login":"osu-mist","id":6473936,"avatar_url":"https://avatars.githubusercontent.com/u/6473936?v=3","gravatar_id":"","url":"https://api.github.com/users/osu-mist","html_url":"https://github.com/osu-mist","followers_url":"https://api.github.com/users/osu-mist/followers","following_url":"https://api.github.com/users/osu-mist/following{/other_user}","gists_url":"https://api.github.com/users/osu-mist/gists{/gist_id}","starred_url":"https://api.github.com/users/osu-mist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osu-mist/subscriptions","organizations_url":"https://api.github.com/users/osu-mist/orgs","repos_url":"https://api.github.com/users/osu-mist/repos","events_url":"https://api.github.com/users/osu-mist/events{/privacy}","received_events_url":"https://api.github.com/users/osu-mist/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/osu-mist/locations-frontend-api","description":"Locations API frontend that consumes data from elasticsearch.","fork":false,"url":"https://api.github.com/repos/osu-mist/locations-frontend-api","forks_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/forks","keys_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/teams","hooks_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/hooks","issue_events_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/issues/events{/number}","events_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/events","assignees_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/assignees{/user}","branches_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/branches{/branch}","tags_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/tags","blobs_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/statuses/{sha}","languages_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/languages","stargazers_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/stargazers","contributors_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/contributors","subscribers_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/subscribers","subscription_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/subscription","commits_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/contents/{+path}","compare_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/merges","archive_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/downloads","issues_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/issues{/number}","pulls_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/pulls{/number}","milestones_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/milestones{/number}","notifications_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/labels{/name}","releases_url":"https://api.github.com/repos/osu-mist/locations-frontend-api/releases{/id}","created_at":"2016-01-07T19:26:25Z","updated_at":"2016-01-07T19:31:25Z","pushed_at":"2016-01-08T02:04:12Z","git_url":"git://github.com/osu-mist/locations-frontend-api.git","ssh_url":"git@github.com:osu-mist/locations-frontend-api.git","clone_url":"https://github.com/osu-mist/locations-frontend-api.git","svn_url":"https://github.com/osu-mist/locations-frontend-api","homepage":null,"size":141,"stargazers_count":0,"watchers_count":0,"language":"Groovy","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"feature/CO-297-list-locations"}},"_links":{"self":{"href":"https://api.github.com/repos/osu-mist/locations-frontend-api/pulls/3"},"html":{"href":"https://github.com/osu-mist/locations-frontend-api/pull/3"},"issue":{"href":"https://api.github.com/repos/osu-mist/locations-frontend-api/issues/3"},"comments":{"href":"https://api.github.com/repos/osu-mist/locations-frontend-api/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/osu-mist/locations-frontend-api/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/osu-mist/locations-frontend-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/osu-mist/locations-frontend-api/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/osu-mist/locations-frontend-api/statuses/9fd04baff263df8b0cbe0daf4d9c3e071b749be1"}}}}