{"action":"created","comment":{"url":"https://api.github.com/repos/sul-dlss/sul-requests/pulls/comments/84398926","pull_request_review_id":5180552,"id":84398926,"diff_hunk":"@@ -0,0 +1,50 @@\n+require 'json'\n+\n+# API for retrieving the current location from a barcode via Symphony Web Services\n+class SymphonyCurrLocRequest\n+  include ActiveModel::Model # allows initialization with a hash of attributes\n+\n+  attr_accessor :barcode\n+\n+  def current_location\n+    return '' if json.empty?\n+    json['fields']['currentLocation']['key']\n+  rescue\n+    return ''\n+  end","path":"app/models/symphony_curr_loc_request.rb","position":14,"original_position":14,"commit_id":"6396f305a9dcfeb33bbdf88893596fb5d2f60523","original_commit_id":"6396f305a9dcfeb33bbdf88893596fb5d2f60523","user":{"login":"ndushay","id":96775,"avatar_url":"https://avatars.githubusercontent.com/u/96775?v=3","gravatar_id":"","url":"https://api.github.com/users/ndushay","html_url":"https://github.com/ndushay","followers_url":"https://api.github.com/users/ndushay/followers","following_url":"https://api.github.com/users/ndushay/following{/other_user}","gists_url":"https://api.github.com/users/ndushay/gists{/gist_id}","starred_url":"https://api.github.com/users/ndushay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndushay/subscriptions","organizations_url":"https://api.github.com/users/ndushay/orgs","repos_url":"https://api.github.com/users/ndushay/repos","events_url":"https://api.github.com/users/ndushay/events{/privacy}","received_events_url":"https://api.github.com/users/ndushay/received_events","type":"User","site_admin":false},"body":"Not sure this should silenty return empty string if bad or missing json ...  kinda followed the pattern from `symphony_user_email_requests` ","created_at":"2016-10-20T23:56:50Z","updated_at":"2016-10-20T23:57:19Z","html_url":"https://github.com/sul-dlss/sul-requests/pull/591#discussion_r84398926","pull_request_url":"https://api.github.com/repos/sul-dlss/sul-requests/pulls/591","_links":{"self":{"href":"https://api.github.com/repos/sul-dlss/sul-requests/pulls/comments/84398926"},"html":{"href":"https://github.com/sul-dlss/sul-requests/pull/591#discussion_r84398926"},"pull_request":{"href":"https://api.github.com/repos/sul-dlss/sul-requests/pulls/591"}}},"pull_request":{"url":"https://api.github.com/repos/sul-dlss/sul-requests/pulls/591","id":90298015,"html_url":"https://github.com/sul-dlss/sul-requests/pull/591","diff_url":"https://github.com/sul-dlss/sul-requests/pull/591.diff","patch_url":"https://github.com/sul-dlss/sul-requests/pull/591.patch","issue_url":"https://api.github.com/repos/sul-dlss/sul-requests/issues/591","number":591,"state":"open","locked":false,"title":"Add model to lookup current location from a barcode","user":{"login":"ndushay","id":96775,"avatar_url":"https://avatars.githubusercontent.com/u/96775?v=3","gravatar_id":"","url":"https://api.github.com/users/ndushay","html_url":"https://github.com/ndushay","followers_url":"https://api.github.com/users/ndushay/followers","following_url":"https://api.github.com/users/ndushay/following{/other_user}","gists_url":"https://api.github.com/users/ndushay/gists{/gist_id}","starred_url":"https://api.github.com/users/ndushay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndushay/subscriptions","organizations_url":"https://api.github.com/users/ndushay/orgs","repos_url":"https://api.github.com/users/ndushay/repos","events_url":"https://api.github.com/users/ndushay/events{/privacy}","received_events_url":"https://api.github.com/users/ndushay/received_events","type":"User","site_admin":false},"body":"@jkeck ","created_at":"2016-10-20T23:13:31Z","updated_at":"2016-10-20T23:57:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"56fceb00bd3668f583f5dcd6bebe3fbe8ce4bd9d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/sul-dlss/sul-requests/pulls/591/commits","review_comments_url":"https://api.github.com/repos/sul-dlss/sul-requests/pulls/591/comments","review_comment_url":"https://api.github.com/repos/sul-dlss/sul-requests/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sul-dlss/sul-requests/issues/591/comments","statuses_url":"https://api.github.com/repos/sul-dlss/sul-requests/statuses/6396f305a9dcfeb33bbdf88893596fb5d2f60523","head":{"label":"sul-dlss:547-curr-loc-for-barcode","ref":"547-curr-loc-for-barcode","sha":"6396f305a9dcfeb33bbdf88893596fb5d2f60523","user":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"repo":{"id":33213527,"name":"sul-requests","full_name":"sul-dlss/sul-requests","owner":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sul-dlss/sul-requests","description":"Rails application for requesting materials from Stanford University Library","fork":false,"url":"https://api.github.com/repos/sul-dlss/sul-requests","forks_url":"https://api.github.com/repos/sul-dlss/sul-requests/forks","keys_url":"https://api.github.com/repos/sul-dlss/sul-requests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sul-dlss/sul-requests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sul-dlss/sul-requests/teams","hooks_url":"https://api.github.com/repos/sul-dlss/sul-requests/hooks","issue_events_url":"https://api.github.com/repos/sul-dlss/sul-requests/issues/events{/number}","events_url":"https://api.github.com/repos/sul-dlss/sul-requests/events","assignees_url":"https://api.github.com/repos/sul-dlss/sul-requests/assignees{/user}","branches_url":"https://api.github.com/repos/sul-dlss/sul-requests/branches{/branch}","tags_url":"https://api.github.com/repos/sul-dlss/sul-requests/tags","blobs_url":"https://api.github.com/repos/sul-dlss/sul-requests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sul-dlss/sul-requests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sul-dlss/sul-requests/git/refs{/sha}","trees_url":"https://api.github.com/repos/sul-dlss/sul-requests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sul-dlss/sul-requests/statuses/{sha}","languages_url":"https://api.github.com/repos/sul-dlss/sul-requests/languages","stargazers_url":"https://api.github.com/repos/sul-dlss/sul-requests/stargazers","contributors_url":"https://api.github.com/repos/sul-dlss/sul-requests/contributors","subscribers_url":"https://api.github.com/repos/sul-dlss/sul-requests/subscribers","subscription_url":"https://api.github.com/repos/sul-dlss/sul-requests/subscription","commits_url":"https://api.github.com/repos/sul-dlss/sul-requests/commits{/sha}","git_commits_url":"https://api.github.com/repos/sul-dlss/sul-requests/git/commits{/sha}","comments_url":"https://api.github.com/repos/sul-dlss/sul-requests/comments{/number}","issue_comment_url":"https://api.github.com/repos/sul-dlss/sul-requests/issues/comments{/number}","contents_url":"https://api.github.com/repos/sul-dlss/sul-requests/contents/{+path}","compare_url":"https://api.github.com/repos/sul-dlss/sul-requests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sul-dlss/sul-requests/merges","archive_url":"https://api.github.com/repos/sul-dlss/sul-requests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sul-dlss/sul-requests/downloads","issues_url":"https://api.github.com/repos/sul-dlss/sul-requests/issues{/number}","pulls_url":"https://api.github.com/repos/sul-dlss/sul-requests/pulls{/number}","milestones_url":"https://api.github.com/repos/sul-dlss/sul-requests/milestones{/number}","notifications_url":"https://api.github.com/repos/sul-dlss/sul-requests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sul-dlss/sul-requests/labels{/name}","releases_url":"https://api.github.com/repos/sul-dlss/sul-requests/releases{/id}","deployments_url":"https://api.github.com/repos/sul-dlss/sul-requests/deployments","created_at":"2015-03-31T22:27:27Z","updated_at":"2016-02-09T18:30:45Z","pushed_at":"2016-10-20T23:55:04Z","git_url":"git://github.com/sul-dlss/sul-requests.git","ssh_url":"git@github.com:sul-dlss/sul-requests.git","clone_url":"https://github.com/sul-dlss/sul-requests.git","svn_url":"https://github.com/sul-dlss/sul-requests","homepage":null,"size":2860,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":35,"forks":0,"open_issues":35,"watchers":2,"default_branch":"master"}},"base":{"label":"sul-dlss:improved-item-lookup","ref":"improved-item-lookup","sha":"3e20047bed67640fb53bead76d54664c7fc7320e","user":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"repo":{"id":33213527,"name":"sul-requests","full_name":"sul-dlss/sul-requests","owner":{"login":"sul-dlss","id":230583,"avatar_url":"https://avatars.githubusercontent.com/u/230583?v=3","gravatar_id":"","url":"https://api.github.com/users/sul-dlss","html_url":"https://github.com/sul-dlss","followers_url":"https://api.github.com/users/sul-dlss/followers","following_url":"https://api.github.com/users/sul-dlss/following{/other_user}","gists_url":"https://api.github.com/users/sul-dlss/gists{/gist_id}","starred_url":"https://api.github.com/users/sul-dlss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sul-dlss/subscriptions","organizations_url":"https://api.github.com/users/sul-dlss/orgs","repos_url":"https://api.github.com/users/sul-dlss/repos","events_url":"https://api.github.com/users/sul-dlss/events{/privacy}","received_events_url":"https://api.github.com/users/sul-dlss/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sul-dlss/sul-requests","description":"Rails application for requesting materials from Stanford University Library","fork":false,"url":"https://api.github.com/repos/sul-dlss/sul-requests","forks_url":"https://api.github.com/repos/sul-dlss/sul-requests/forks","keys_url":"https://api.github.com/repos/sul-dlss/sul-requests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sul-dlss/sul-requests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sul-dlss/sul-requests/teams","hooks_url":"https://api.github.com/repos/sul-dlss/sul-requests/hooks","issue_events_url":"https://api.github.com/repos/sul-dlss/sul-requests/issues/events{/number}","events_url":"https://api.github.com/repos/sul-dlss/sul-requests/events","assignees_url":"https://api.github.com/repos/sul-dlss/sul-requests/assignees{/user}","branches_url":"https://api.github.com/repos/sul-dlss/sul-requests/branches{/branch}","tags_url":"https://api.github.com/repos/sul-dlss/sul-requests/tags","blobs_url":"https://api.github.com/repos/sul-dlss/sul-requests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sul-dlss/sul-requests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sul-dlss/sul-requests/git/refs{/sha}","trees_url":"https://api.github.com/repos/sul-dlss/sul-requests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sul-dlss/sul-requests/statuses/{sha}","languages_url":"https://api.github.com/repos/sul-dlss/sul-requests/languages","stargazers_url":"https://api.github.com/repos/sul-dlss/sul-requests/stargazers","contributors_url":"https://api.github.com/repos/sul-dlss/sul-requests/contributors","subscribers_url":"https://api.github.com/repos/sul-dlss/sul-requests/subscribers","subscription_url":"https://api.github.com/repos/sul-dlss/sul-requests/subscription","commits_url":"https://api.github.com/repos/sul-dlss/sul-requests/commits{/sha}","git_commits_url":"https://api.github.com/repos/sul-dlss/sul-requests/git/commits{/sha}","comments_url":"https://api.github.com/repos/sul-dlss/sul-requests/comments{/number}","issue_comment_url":"https://api.github.com/repos/sul-dlss/sul-requests/issues/comments{/number}","contents_url":"https://api.github.com/repos/sul-dlss/sul-requests/contents/{+path}","compare_url":"https://api.github.com/repos/sul-dlss/sul-requests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sul-dlss/sul-requests/merges","archive_url":"https://api.github.com/repos/sul-dlss/sul-requests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sul-dlss/sul-requests/downloads","issues_url":"https://api.github.com/repos/sul-dlss/sul-requests/issues{/number}","pulls_url":"https://api.github.com/repos/sul-dlss/sul-requests/pulls{/number}","milestones_url":"https://api.github.com/repos/sul-dlss/sul-requests/milestones{/number}","notifications_url":"https://api.github.com/repos/sul-dlss/sul-requests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sul-dlss/sul-requests/labels{/name}","releases_url":"https://api.github.com/repos/sul-dlss/sul-requests/releases{/id}","deployments_url":"https://api.github.com/repos/sul-dlss/sul-requests/deployments","created_at":"2015-03-31T22:27:27Z","updated_at":"2016-02-09T18:30:45Z","pushed_at":"2016-10-20T23:55:04Z","git_url":"git://github.com/sul-dlss/sul-requests.git","ssh_url":"git@github.com:sul-dlss/sul-requests.git","clone_url":"https://github.com/sul-dlss/sul-requests.git","svn_url":"https://github.com/sul-dlss/sul-requests","homepage":null,"size":2860,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":35,"forks":0,"open_issues":35,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sul-dlss/sul-requests/pulls/591"},"html":{"href":"https://github.com/sul-dlss/sul-requests/pull/591"},"issue":{"href":"https://api.github.com/repos/sul-dlss/sul-requests/issues/591"},"comments":{"href":"https://api.github.com/repos/sul-dlss/sul-requests/issues/591/comments"},"review_comments":{"href":"https://api.github.com/repos/sul-dlss/sul-requests/pulls/591/comments"},"review_comment":{"href":"https://api.github.com/repos/sul-dlss/sul-requests/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sul-dlss/sul-requests/pulls/591/commits"},"statuses":{"href":"https://api.github.com/repos/sul-dlss/sul-requests/statuses/6396f305a9dcfeb33bbdf88893596fb5d2f60523"}}}}
{"actor":{"display_login":"ndushay"}}