{"action":"closed","number":3,"pull_request":{"url":"https://api.github.com/repos/trocc/trocc-app/pulls/3","id":29758946,"html_url":"https://github.com/trocc/trocc-app/pull/3","diff_url":"https://github.com/trocc/trocc-app/pull/3.diff","patch_url":"https://github.com/trocc/trocc-app/pull/3.patch","issue_url":"https://api.github.com/repos/trocc/trocc-app/issues/3","number":3,"state":"closed","locked":false,"title":"User Rest api enhancements","user":{"login":"cristianlucaci","id":8897508,"avatar_url":"https://avatars.githubusercontent.com/u/8897508?v=3","gravatar_id":"","url":"https://api.github.com/users/cristianlucaci","html_url":"https://github.com/cristianlucaci","followers_url":"https://api.github.com/users/cristianlucaci/followers","following_url":"https://api.github.com/users/cristianlucaci/following{/other_user}","gists_url":"https://api.github.com/users/cristianlucaci/gists{/gist_id}","starred_url":"https://api.github.com/users/cristianlucaci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cristianlucaci/subscriptions","organizations_url":"https://api.github.com/users/cristianlucaci/orgs","repos_url":"https://api.github.com/users/cristianlucaci/repos","events_url":"https://api.github.com/users/cristianlucaci/events{/privacy}","received_events_url":"https://api.github.com/users/cristianlucaci/received_events","type":"User","site_admin":false},"body":"GET:http  http://127.0.0.1:8000/api/users/ -> list of active users, Staff not included\r\n\r\nSearch:\r\nGET: http  http://127.0.0.1:8000/api/users/?query=value\r\nwhere query = 'rating_min', 'rating_max', 'rating', 'username', 'email', 'is_active',\r\n 'joined_after', 'joined_before'\r\n\r\nList of active/passive users\r\nhttp://127.0.0.1:8000/api/users/?is_active=True/False\r\n\r\nNew user\r\nPOST: http --json POST http://127.0.0.1:8000/api/users/ username=\"ABC\" password=\"abc123\" email=\"alaasa2@daa.coqm\" first_name=\"abc\" last_name=\"asd\"\r\n\r\nrequired fields: username(unique per app), email(unique per app), password\r\n\r\nGET user\r\nhttp --json -a ABC23:abc123 http://127.0.0.1:8000/api/users/51/\r\n\r\nUpdate user (all fields are update-able, including username, password and email)\r\nPUT: http --json -a ABC2:abc123 PUT http://127.0.0.1:8000/api/users/51/ username=\"ABC23\" password=\"abc123\" email=\"email@daa.coqm\" first_name=\"abc\" last_name=\"asd\"\r\n\r\n### Profile\r\nGET profile\r\nhttp --json http://127.0.0.1:8000/api/users/24/profile/ -a test:test\r\n\r\nPUT profile\r\nhttp --json PUT http://127.0.0.1:8000/api/users/24/profile/ -a test:test phone_number=\"+999999997\"\r\n\r\nDELETE profil - disable user\r\nhttp --json -a test:test DELETE  http://127.0.0.1:8000/api/users/24/profile/ \r\n\r\nForbidden: profile created when user created\r\nhttp --json -a test:test POST  http://127.0.0.1:8000/api/users/24/profile/ ","created_at":"2015-02-21T19:58:37Z","updated_at":"2015-02-23T20:01:07Z","closed_at":"2015-02-23T20:01:07Z","merged_at":"2015-02-23T20:01:07Z","merge_commit_sha":"5eae614fc8c7a2c5de7dc909dc5b7716fff7deb4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/trocc/trocc-app/pulls/3/commits","review_comments_url":"https://api.github.com/repos/trocc/trocc-app/pulls/3/comments","review_comment_url":"https://api.github.com/repos/trocc/trocc-app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/trocc/trocc-app/issues/3/comments","statuses_url":"https://api.github.com/repos/trocc/trocc-app/statuses/5e22b0b23619c8b840039701f102f0fbfa7eda8d","head":{"label":"trocc:rest","ref":"rest","sha":"5e22b0b23619c8b840039701f102f0fbfa7eda8d","user":{"login":"trocc","id":9536745,"avatar_url":"https://avatars.githubusercontent.com/u/9536745?v=3","gravatar_id":"","url":"https://api.github.com/users/trocc","html_url":"https://github.com/trocc","followers_url":"https://api.github.com/users/trocc/followers","following_url":"https://api.github.com/users/trocc/following{/other_user}","gists_url":"https://api.github.com/users/trocc/gists{/gist_id}","starred_url":"https://api.github.com/users/trocc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trocc/subscriptions","organizations_url":"https://api.github.com/users/trocc/orgs","repos_url":"https://api.github.com/users/trocc/repos","events_url":"https://api.github.com/users/trocc/events{/privacy}","received_events_url":"https://api.github.com/users/trocc/received_events","type":"Organization","site_admin":false},"repo":{"id":28535595,"name":"trocc-app","full_name":"trocc/trocc-app","owner":{"login":"trocc","id":9536745,"avatar_url":"https://avatars.githubusercontent.com/u/9536745?v=3","gravatar_id":"","url":"https://api.github.com/users/trocc","html_url":"https://github.com/trocc","followers_url":"https://api.github.com/users/trocc/followers","following_url":"https://api.github.com/users/trocc/following{/other_user}","gists_url":"https://api.github.com/users/trocc/gists{/gist_id}","starred_url":"https://api.github.com/users/trocc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trocc/subscriptions","organizations_url":"https://api.github.com/users/trocc/orgs","repos_url":"https://api.github.com/users/trocc/repos","events_url":"https://api.github.com/users/trocc/events{/privacy}","received_events_url":"https://api.github.com/users/trocc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/trocc/trocc-app","description":"","fork":false,"url":"https://api.github.com/repos/trocc/trocc-app","forks_url":"https://api.github.com/repos/trocc/trocc-app/forks","keys_url":"https://api.github.com/repos/trocc/trocc-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trocc/trocc-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trocc/trocc-app/teams","hooks_url":"https://api.github.com/repos/trocc/trocc-app/hooks","issue_events_url":"https://api.github.com/repos/trocc/trocc-app/issues/events{/number}","events_url":"https://api.github.com/repos/trocc/trocc-app/events","assignees_url":"https://api.github.com/repos/trocc/trocc-app/assignees{/user}","branches_url":"https://api.github.com/repos/trocc/trocc-app/branches{/branch}","tags_url":"https://api.github.com/repos/trocc/trocc-app/tags","blobs_url":"https://api.github.com/repos/trocc/trocc-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trocc/trocc-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trocc/trocc-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/trocc/trocc-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trocc/trocc-app/statuses/{sha}","languages_url":"https://api.github.com/repos/trocc/trocc-app/languages","stargazers_url":"https://api.github.com/repos/trocc/trocc-app/stargazers","contributors_url":"https://api.github.com/repos/trocc/trocc-app/contributors","subscribers_url":"https://api.github.com/repos/trocc/trocc-app/subscribers","subscription_url":"https://api.github.com/repos/trocc/trocc-app/subscription","commits_url":"https://api.github.com/repos/trocc/trocc-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/trocc/trocc-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/trocc/trocc-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/trocc/trocc-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/trocc/trocc-app/contents/{+path}","compare_url":"https://api.github.com/repos/trocc/trocc-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trocc/trocc-app/merges","archive_url":"https://api.github.com/repos/trocc/trocc-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trocc/trocc-app/downloads","issues_url":"https://api.github.com/repos/trocc/trocc-app/issues{/number}","pulls_url":"https://api.github.com/repos/trocc/trocc-app/pulls{/number}","milestones_url":"https://api.github.com/repos/trocc/trocc-app/milestones{/number}","notifications_url":"https://api.github.com/repos/trocc/trocc-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trocc/trocc-app/labels{/name}","releases_url":"https://api.github.com/repos/trocc/trocc-app/releases{/id}","created_at":"2014-12-27T11:50:31Z","updated_at":"2015-02-16T20:04:42Z","pushed_at":"2015-02-23T20:01:07Z","git_url":"git://github.com/trocc/trocc-app.git","ssh_url":"git@github.com:trocc/trocc-app.git","clone_url":"https://github.com/trocc/trocc-app.git","svn_url":"https://github.com/trocc/trocc-app","homepage":null,"size":348,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"trocc:develop","ref":"develop","sha":"4ef2e3b2e5c35403d08b7ca2de23c32ee4481f42","user":{"login":"trocc","id":9536745,"avatar_url":"https://avatars.githubusercontent.com/u/9536745?v=3","gravatar_id":"","url":"https://api.github.com/users/trocc","html_url":"https://github.com/trocc","followers_url":"https://api.github.com/users/trocc/followers","following_url":"https://api.github.com/users/trocc/following{/other_user}","gists_url":"https://api.github.com/users/trocc/gists{/gist_id}","starred_url":"https://api.github.com/users/trocc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trocc/subscriptions","organizations_url":"https://api.github.com/users/trocc/orgs","repos_url":"https://api.github.com/users/trocc/repos","events_url":"https://api.github.com/users/trocc/events{/privacy}","received_events_url":"https://api.github.com/users/trocc/received_events","type":"Organization","site_admin":false},"repo":{"id":28535595,"name":"trocc-app","full_name":"trocc/trocc-app","owner":{"login":"trocc","id":9536745,"avatar_url":"https://avatars.githubusercontent.com/u/9536745?v=3","gravatar_id":"","url":"https://api.github.com/users/trocc","html_url":"https://github.com/trocc","followers_url":"https://api.github.com/users/trocc/followers","following_url":"https://api.github.com/users/trocc/following{/other_user}","gists_url":"https://api.github.com/users/trocc/gists{/gist_id}","starred_url":"https://api.github.com/users/trocc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trocc/subscriptions","organizations_url":"https://api.github.com/users/trocc/orgs","repos_url":"https://api.github.com/users/trocc/repos","events_url":"https://api.github.com/users/trocc/events{/privacy}","received_events_url":"https://api.github.com/users/trocc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/trocc/trocc-app","description":"","fork":false,"url":"https://api.github.com/repos/trocc/trocc-app","forks_url":"https://api.github.com/repos/trocc/trocc-app/forks","keys_url":"https://api.github.com/repos/trocc/trocc-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trocc/trocc-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trocc/trocc-app/teams","hooks_url":"https://api.github.com/repos/trocc/trocc-app/hooks","issue_events_url":"https://api.github.com/repos/trocc/trocc-app/issues/events{/number}","events_url":"https://api.github.com/repos/trocc/trocc-app/events","assignees_url":"https://api.github.com/repos/trocc/trocc-app/assignees{/user}","branches_url":"https://api.github.com/repos/trocc/trocc-app/branches{/branch}","tags_url":"https://api.github.com/repos/trocc/trocc-app/tags","blobs_url":"https://api.github.com/repos/trocc/trocc-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trocc/trocc-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trocc/trocc-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/trocc/trocc-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trocc/trocc-app/statuses/{sha}","languages_url":"https://api.github.com/repos/trocc/trocc-app/languages","stargazers_url":"https://api.github.com/repos/trocc/trocc-app/stargazers","contributors_url":"https://api.github.com/repos/trocc/trocc-app/contributors","subscribers_url":"https://api.github.com/repos/trocc/trocc-app/subscribers","subscription_url":"https://api.github.com/repos/trocc/trocc-app/subscription","commits_url":"https://api.github.com/repos/trocc/trocc-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/trocc/trocc-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/trocc/trocc-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/trocc/trocc-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/trocc/trocc-app/contents/{+path}","compare_url":"https://api.github.com/repos/trocc/trocc-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trocc/trocc-app/merges","archive_url":"https://api.github.com/repos/trocc/trocc-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trocc/trocc-app/downloads","issues_url":"https://api.github.com/repos/trocc/trocc-app/issues{/number}","pulls_url":"https://api.github.com/repos/trocc/trocc-app/pulls{/number}","milestones_url":"https://api.github.com/repos/trocc/trocc-app/milestones{/number}","notifications_url":"https://api.github.com/repos/trocc/trocc-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trocc/trocc-app/labels{/name}","releases_url":"https://api.github.com/repos/trocc/trocc-app/releases{/id}","created_at":"2014-12-27T11:50:31Z","updated_at":"2015-02-16T20:04:42Z","pushed_at":"2015-02-23T20:01:07Z","git_url":"git://github.com/trocc/trocc-app.git","ssh_url":"git@github.com:trocc/trocc-app.git","clone_url":"https://github.com/trocc/trocc-app.git","svn_url":"https://github.com/trocc/trocc-app","homepage":null,"size":348,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/trocc/trocc-app/pulls/3"},"html":{"href":"https://github.com/trocc/trocc-app/pull/3"},"issue":{"href":"https://api.github.com/repos/trocc/trocc-app/issues/3"},"comments":{"href":"https://api.github.com/repos/trocc/trocc-app/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/trocc/trocc-app/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/trocc/trocc-app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/trocc/trocc-app/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/trocc/trocc-app/statuses/5e22b0b23619c8b840039701f102f0fbfa7eda8d"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"marianlungu0001","id":8655216,"avatar_url":"https://avatars.githubusercontent.com/u/8655216?v=3","gravatar_id":"","url":"https://api.github.com/users/marianlungu0001","html_url":"https://github.com/marianlungu0001","followers_url":"https://api.github.com/users/marianlungu0001/followers","following_url":"https://api.github.com/users/marianlungu0001/following{/other_user}","gists_url":"https://api.github.com/users/marianlungu0001/gists{/gist_id}","starred_url":"https://api.github.com/users/marianlungu0001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marianlungu0001/subscriptions","organizations_url":"https://api.github.com/users/marianlungu0001/orgs","repos_url":"https://api.github.com/users/marianlungu0001/repos","events_url":"https://api.github.com/users/marianlungu0001/events{/privacy}","received_events_url":"https://api.github.com/users/marianlungu0001/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":4,"additions":92,"deletions":39,"changed_files":7}}