{"action":"opened","number":25,"pull_request":{"url":"https://api.github.com/repos/ShareLocker/ShareLockers/pulls/25","id":39744335,"html_url":"https://github.com/ShareLocker/ShareLockers/pull/25","diff_url":"https://github.com/ShareLocker/ShareLockers/pull/25.diff","patch_url":"https://github.com/ShareLocker/ShareLockers/pull/25.patch","issue_url":"https://api.github.com/repos/ShareLocker/ShareLockers/issues/25","number":25,"state":"open","locked":false,"title":"Add unlock action","user":{"login":"jwaldrep","id":8503188,"avatar_url":"https://avatars.githubusercontent.com/u/8503188?v=3","gravatar_id":"","url":"https://api.github.com/users/jwaldrep","html_url":"https://github.com/jwaldrep","followers_url":"https://api.github.com/users/jwaldrep/followers","following_url":"https://api.github.com/users/jwaldrep/following{/other_user}","gists_url":"https://api.github.com/users/jwaldrep/gists{/gist_id}","starred_url":"https://api.github.com/users/jwaldrep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwaldrep/subscriptions","organizations_url":"https://api.github.com/users/jwaldrep/orgs","repos_url":"https://api.github.com/users/jwaldrep/repos","events_url":"https://api.github.com/users/jwaldrep/events{/privacy}","received_events_url":"https://api.github.com/users/jwaldrep/received_events","type":"User","site_admin":false},"body":"Unlocking a locker is done by POSTing to /api/unlocks/ with data of this form:\r\n{\r\n    \"waiting\": true,\r\n    \"profile\": 1,\r\n    \"locker\": 1\r\n}\r\nThis will unlock the locker (by user profile 1) with locker id of 1 and create an Unlock object in the database.  Note that waiting needs to be set to true (needed for polling) -- this will be changed to false automatically when the client hub polls the server.\r\n\r\nSeveral things happen automatically when this POST request is submitted (see api.views.UnlockViewSet.perform_create):\r\n  - Verify the logged in user owns the item in the locker being unlocked (currently doesn't return an error code, just doesn't save the object...)\r\n  - Set the hub with data needed and waiting flags until it is polled next by the proper client\r\n  - Destock the item from the locker (item.locker = None)\r\n\r\nWhen the client polls the server, it receives a message to open the appropriate locker, which then does the rest of the work (see hubs.views.poll), including clearing the waiting flags on both the hub and the most recent Unlock object\r\n   ","created_at":"2015-07-11T11:03:21Z","updated_at":"2015-07-11T11:03:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ShareLocker/ShareLockers/pulls/25/commits","review_comments_url":"https://api.github.com/repos/ShareLocker/ShareLockers/pulls/25/comments","review_comment_url":"https://api.github.com/repos/ShareLocker/ShareLockers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ShareLocker/ShareLockers/issues/25/comments","statuses_url":"https://api.github.com/repos/ShareLocker/ShareLockers/statuses/9664544b3ee30b506d16b90bfb8b5cebac1271c1","head":{"label":"ShareLocker:add_unlock_action","ref":"add_unlock_action","sha":"9664544b3ee30b506d16b90bfb8b5cebac1271c1","user":{"login":"ShareLocker","id":13203924,"avatar_url":"https://avatars.githubusercontent.com/u/13203924?v=3","gravatar_id":"","url":"https://api.github.com/users/ShareLocker","html_url":"https://github.com/ShareLocker","followers_url":"https://api.github.com/users/ShareLocker/followers","following_url":"https://api.github.com/users/ShareLocker/following{/other_user}","gists_url":"https://api.github.com/users/ShareLocker/gists{/gist_id}","starred_url":"https://api.github.com/users/ShareLocker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShareLocker/subscriptions","organizations_url":"https://api.github.com/users/ShareLocker/orgs","repos_url":"https://api.github.com/users/ShareLocker/repos","events_url":"https://api.github.com/users/ShareLocker/events{/privacy}","received_events_url":"https://api.github.com/users/ShareLocker/received_events","type":"Organization","site_admin":false},"repo":{"id":38633216,"name":"ShareLockers","full_name":"ShareLocker/ShareLockers","owner":{"login":"ShareLocker","id":13203924,"avatar_url":"https://avatars.githubusercontent.com/u/13203924?v=3","gravatar_id":"","url":"https://api.github.com/users/ShareLocker","html_url":"https://github.com/ShareLocker","followers_url":"https://api.github.com/users/ShareLocker/followers","following_url":"https://api.github.com/users/ShareLocker/following{/other_user}","gists_url":"https://api.github.com/users/ShareLocker/gists{/gist_id}","starred_url":"https://api.github.com/users/ShareLocker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShareLocker/subscriptions","organizations_url":"https://api.github.com/users/ShareLocker/orgs","repos_url":"https://api.github.com/users/ShareLocker/repos","events_url":"https://api.github.com/users/ShareLocker/events{/privacy}","received_events_url":"https://api.github.com/users/ShareLocker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ShareLocker/ShareLockers","description":"Web app for local commerce using internet connected lockers","fork":false,"url":"https://api.github.com/repos/ShareLocker/ShareLockers","forks_url":"https://api.github.com/repos/ShareLocker/ShareLockers/forks","keys_url":"https://api.github.com/repos/ShareLocker/ShareLockers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ShareLocker/ShareLockers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ShareLocker/ShareLockers/teams","hooks_url":"https://api.github.com/repos/ShareLocker/ShareLockers/hooks","issue_events_url":"https://api.github.com/repos/ShareLocker/ShareLockers/issues/events{/number}","events_url":"https://api.github.com/repos/ShareLocker/ShareLockers/events","assignees_url":"https://api.github.com/repos/ShareLocker/ShareLockers/assignees{/user}","branches_url":"https://api.github.com/repos/ShareLocker/ShareLockers/branches{/branch}","tags_url":"https://api.github.com/repos/ShareLocker/ShareLockers/tags","blobs_url":"https://api.github.com/repos/ShareLocker/ShareLockers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ShareLocker/ShareLockers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ShareLocker/ShareLockers/git/refs{/sha}","trees_url":"https://api.github.com/repos/ShareLocker/ShareLockers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ShareLocker/ShareLockers/statuses/{sha}","languages_url":"https://api.github.com/repos/ShareLocker/ShareLockers/languages","stargazers_url":"https://api.github.com/repos/ShareLocker/ShareLockers/stargazers","contributors_url":"https://api.github.com/repos/ShareLocker/ShareLockers/contributors","subscribers_url":"https://api.github.com/repos/ShareLocker/ShareLockers/subscribers","subscription_url":"https://api.github.com/repos/ShareLocker/ShareLockers/subscription","commits_url":"https://api.github.com/repos/ShareLocker/ShareLockers/commits{/sha}","git_commits_url":"https://api.github.com/repos/ShareLocker/ShareLockers/git/commits{/sha}","comments_url":"https://api.github.com/repos/ShareLocker/ShareLockers/comments{/number}","issue_comment_url":"https://api.github.com/repos/ShareLocker/ShareLockers/issues/comments{/number}","contents_url":"https://api.github.com/repos/ShareLocker/ShareLockers/contents/{+path}","compare_url":"https://api.github.com/repos/ShareLocker/ShareLockers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ShareLocker/ShareLockers/merges","archive_url":"https://api.github.com/repos/ShareLocker/ShareLockers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ShareLocker/ShareLockers/downloads","issues_url":"https://api.github.com/repos/ShareLocker/ShareLockers/issues{/number}","pulls_url":"https://api.github.com/repos/ShareLocker/ShareLockers/pulls{/number}","milestones_url":"https://api.github.com/repos/ShareLocker/ShareLockers/milestones{/number}","notifications_url":"https://api.github.com/repos/ShareLocker/ShareLockers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ShareLocker/ShareLockers/labels{/name}","releases_url":"https://api.github.com/repos/ShareLocker/ShareLockers/releases{/id}","created_at":"2015-07-06T17:00:43Z","updated_at":"2015-07-11T01:45:31Z","pushed_at":"2015-07-11T10:47:26Z","git_url":"git://github.com/ShareLocker/ShareLockers.git","ssh_url":"git@github.com:ShareLocker/ShareLockers.git","clone_url":"https://github.com/ShareLocker/ShareLockers.git","svn_url":"https://github.com/ShareLocker/ShareLockers","homepage":"","size":26944,"stargazers_count":0,"watchers_count":0,"language":"CSS","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":"ShareLocker:master","ref":"master","sha":"f72341873d964462bb488ac720f12a81fa9dc625","user":{"login":"ShareLocker","id":13203924,"avatar_url":"https://avatars.githubusercontent.com/u/13203924?v=3","gravatar_id":"","url":"https://api.github.com/users/ShareLocker","html_url":"https://github.com/ShareLocker","followers_url":"https://api.github.com/users/ShareLocker/followers","following_url":"https://api.github.com/users/ShareLocker/following{/other_user}","gists_url":"https://api.github.com/users/ShareLocker/gists{/gist_id}","starred_url":"https://api.github.com/users/ShareLocker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShareLocker/subscriptions","organizations_url":"https://api.github.com/users/ShareLocker/orgs","repos_url":"https://api.github.com/users/ShareLocker/repos","events_url":"https://api.github.com/users/ShareLocker/events{/privacy}","received_events_url":"https://api.github.com/users/ShareLocker/received_events","type":"Organization","site_admin":false},"repo":{"id":38633216,"name":"ShareLockers","full_name":"ShareLocker/ShareLockers","owner":{"login":"ShareLocker","id":13203924,"avatar_url":"https://avatars.githubusercontent.com/u/13203924?v=3","gravatar_id":"","url":"https://api.github.com/users/ShareLocker","html_url":"https://github.com/ShareLocker","followers_url":"https://api.github.com/users/ShareLocker/followers","following_url":"https://api.github.com/users/ShareLocker/following{/other_user}","gists_url":"https://api.github.com/users/ShareLocker/gists{/gist_id}","starred_url":"https://api.github.com/users/ShareLocker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShareLocker/subscriptions","organizations_url":"https://api.github.com/users/ShareLocker/orgs","repos_url":"https://api.github.com/users/ShareLocker/repos","events_url":"https://api.github.com/users/ShareLocker/events{/privacy}","received_events_url":"https://api.github.com/users/ShareLocker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ShareLocker/ShareLockers","description":"Web app for local commerce using internet connected lockers","fork":false,"url":"https://api.github.com/repos/ShareLocker/ShareLockers","forks_url":"https://api.github.com/repos/ShareLocker/ShareLockers/forks","keys_url":"https://api.github.com/repos/ShareLocker/ShareLockers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ShareLocker/ShareLockers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ShareLocker/ShareLockers/teams","hooks_url":"https://api.github.com/repos/ShareLocker/ShareLockers/hooks","issue_events_url":"https://api.github.com/repos/ShareLocker/ShareLockers/issues/events{/number}","events_url":"https://api.github.com/repos/ShareLocker/ShareLockers/events","assignees_url":"https://api.github.com/repos/ShareLocker/ShareLockers/assignees{/user}","branches_url":"https://api.github.com/repos/ShareLocker/ShareLockers/branches{/branch}","tags_url":"https://api.github.com/repos/ShareLocker/ShareLockers/tags","blobs_url":"https://api.github.com/repos/ShareLocker/ShareLockers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ShareLocker/ShareLockers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ShareLocker/ShareLockers/git/refs{/sha}","trees_url":"https://api.github.com/repos/ShareLocker/ShareLockers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ShareLocker/ShareLockers/statuses/{sha}","languages_url":"https://api.github.com/repos/ShareLocker/ShareLockers/languages","stargazers_url":"https://api.github.com/repos/ShareLocker/ShareLockers/stargazers","contributors_url":"https://api.github.com/repos/ShareLocker/ShareLockers/contributors","subscribers_url":"https://api.github.com/repos/ShareLocker/ShareLockers/subscribers","subscription_url":"https://api.github.com/repos/ShareLocker/ShareLockers/subscription","commits_url":"https://api.github.com/repos/ShareLocker/ShareLockers/commits{/sha}","git_commits_url":"https://api.github.com/repos/ShareLocker/ShareLockers/git/commits{/sha}","comments_url":"https://api.github.com/repos/ShareLocker/ShareLockers/comments{/number}","issue_comment_url":"https://api.github.com/repos/ShareLocker/ShareLockers/issues/comments{/number}","contents_url":"https://api.github.com/repos/ShareLocker/ShareLockers/contents/{+path}","compare_url":"https://api.github.com/repos/ShareLocker/ShareLockers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ShareLocker/ShareLockers/merges","archive_url":"https://api.github.com/repos/ShareLocker/ShareLockers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ShareLocker/ShareLockers/downloads","issues_url":"https://api.github.com/repos/ShareLocker/ShareLockers/issues{/number}","pulls_url":"https://api.github.com/repos/ShareLocker/ShareLockers/pulls{/number}","milestones_url":"https://api.github.com/repos/ShareLocker/ShareLockers/milestones{/number}","notifications_url":"https://api.github.com/repos/ShareLocker/ShareLockers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ShareLocker/ShareLockers/labels{/name}","releases_url":"https://api.github.com/repos/ShareLocker/ShareLockers/releases{/id}","created_at":"2015-07-06T17:00:43Z","updated_at":"2015-07-11T01:45:31Z","pushed_at":"2015-07-11T10:47:26Z","git_url":"git://github.com/ShareLocker/ShareLockers.git","ssh_url":"git@github.com:ShareLocker/ShareLockers.git","clone_url":"https://github.com/ShareLocker/ShareLockers.git","svn_url":"https://github.com/ShareLocker/ShareLockers","homepage":"","size":26944,"stargazers_count":0,"watchers_count":0,"language":"CSS","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/ShareLocker/ShareLockers/pulls/25"},"html":{"href":"https://github.com/ShareLocker/ShareLockers/pull/25"},"issue":{"href":"https://api.github.com/repos/ShareLocker/ShareLockers/issues/25"},"comments":{"href":"https://api.github.com/repos/ShareLocker/ShareLockers/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/ShareLocker/ShareLockers/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/ShareLocker/ShareLockers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ShareLocker/ShareLockers/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/ShareLocker/ShareLockers/statuses/9664544b3ee30b506d16b90bfb8b5cebac1271c1"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":11,"additions":361,"deletions":125,"changed_files":10}}