{"action":"opened","number":2119,"pull_request":{"url":"https://api.github.com/repos/xtuple/xtuple/pulls/2119","id":27356705,"html_url":"https://github.com/xtuple/xtuple/pull/2119","diff_url":"https://github.com/xtuple/xtuple/pull/2119.diff","patch_url":"https://github.com/xtuple/xtuple/pull/2119.patch","issue_url":"https://api.github.com/repos/xtuple/xtuple/issues/2119","number":2119,"state":"open","locked":false,"title":"Expose user preferences to REST","user":{"login":"shackbarth","id":1056617,"avatar_url":"https://avatars.githubusercontent.com/u/1056617?v=3","gravatar_id":"","url":"https://api.github.com/users/shackbarth","html_url":"https://github.com/shackbarth","followers_url":"https://api.github.com/users/shackbarth/followers","following_url":"https://api.github.com/users/shackbarth/following{/other_user}","gists_url":"https://api.github.com/users/shackbarth/gists{/gist_id}","starred_url":"https://api.github.com/users/shackbarth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shackbarth/subscriptions","organizations_url":"https://api.github.com/users/shackbarth/orgs","repos_url":"https://api.github.com/users/shackbarth/repos","events_url":"https://api.github.com/users/shackbarth/events{/privacy}","received_events_url":"https://api.github.com/users/shackbarth/received_events","type":"User","site_admin":false},"body":"Easy way to persist and retrieve user preferences via REST. The user is assumed to be whatever user is making the request. Note that we persist to `xt.userpref` and not `public.usrpref`. \r\n\r\n```\r\n$.ajax({\r\n      url: '/' + org + '/browser-api/v1/services/user-preference/commit-preference',\r\n      type: \"POST\",\r\n      dataType: \"json\",\r\n      data: {\r\n        attributes: [\r\n          \"my_userpref_name\",\r\n          \"my_userpref_value\"\r\n        ]\r\n      }\r\n});\r\n```\r\n\r\n```\r\n$.ajax({\r\n      url: '/' + org + '/browser-api/v1/services/user-preference/get-preference',\r\n      type: \"POST\",\r\n      dataType: \"json\",\r\n      data: {\r\n        attributes: [\r\n          \"my_userpref_value\"\r\n        ]\r\n      }\r\n});\r\n```","created_at":"2015-01-14T15:19:29Z","updated_at":"2015-01-14T15:19:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/xtuple/xtuple/pulls/2119/commits","review_comments_url":"https://api.github.com/repos/xtuple/xtuple/pulls/2119/comments","review_comment_url":"https://api.github.com/repos/xtuple/xtuple/pulls/comments/{number}","comments_url":"https://api.github.com/repos/xtuple/xtuple/issues/2119/comments","statuses_url":"https://api.github.com/repos/xtuple/xtuple/statuses/bc9107be5ed22b785860aee6938057f519788f13","head":{"label":"shackbarth:userpref","ref":"userpref","sha":"bc9107be5ed22b785860aee6938057f519788f13","user":{"login":"shackbarth","id":1056617,"avatar_url":"https://avatars.githubusercontent.com/u/1056617?v=3","gravatar_id":"","url":"https://api.github.com/users/shackbarth","html_url":"https://github.com/shackbarth","followers_url":"https://api.github.com/users/shackbarth/followers","following_url":"https://api.github.com/users/shackbarth/following{/other_user}","gists_url":"https://api.github.com/users/shackbarth/gists{/gist_id}","starred_url":"https://api.github.com/users/shackbarth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shackbarth/subscriptions","organizations_url":"https://api.github.com/users/shackbarth/orgs","repos_url":"https://api.github.com/users/shackbarth/repos","events_url":"https://api.github.com/users/shackbarth/events{/privacy}","received_events_url":"https://api.github.com/users/shackbarth/received_events","type":"User","site_admin":false},"repo":{"id":8188127,"name":"xtuple","full_name":"shackbarth/xtuple","owner":{"login":"shackbarth","id":1056617,"avatar_url":"https://avatars.githubusercontent.com/u/1056617?v=3","gravatar_id":"","url":"https://api.github.com/users/shackbarth","html_url":"https://github.com/shackbarth","followers_url":"https://api.github.com/users/shackbarth/followers","following_url":"https://api.github.com/users/shackbarth/following{/other_user}","gists_url":"https://api.github.com/users/shackbarth/gists{/gist_id}","starred_url":"https://api.github.com/users/shackbarth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shackbarth/subscriptions","organizations_url":"https://api.github.com/users/shackbarth/orgs","repos_url":"https://api.github.com/users/shackbarth/repos","events_url":"https://api.github.com/users/shackbarth/events{/privacy}","received_events_url":"https://api.github.com/users/shackbarth/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shackbarth/xtuple","description":"xTuple Enterprise Resource Planning","fork":true,"url":"https://api.github.com/repos/shackbarth/xtuple","forks_url":"https://api.github.com/repos/shackbarth/xtuple/forks","keys_url":"https://api.github.com/repos/shackbarth/xtuple/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shackbarth/xtuple/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shackbarth/xtuple/teams","hooks_url":"https://api.github.com/repos/shackbarth/xtuple/hooks","issue_events_url":"https://api.github.com/repos/shackbarth/xtuple/issues/events{/number}","events_url":"https://api.github.com/repos/shackbarth/xtuple/events","assignees_url":"https://api.github.com/repos/shackbarth/xtuple/assignees{/user}","branches_url":"https://api.github.com/repos/shackbarth/xtuple/branches{/branch}","tags_url":"https://api.github.com/repos/shackbarth/xtuple/tags","blobs_url":"https://api.github.com/repos/shackbarth/xtuple/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shackbarth/xtuple/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shackbarth/xtuple/git/refs{/sha}","trees_url":"https://api.github.com/repos/shackbarth/xtuple/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shackbarth/xtuple/statuses/{sha}","languages_url":"https://api.github.com/repos/shackbarth/xtuple/languages","stargazers_url":"https://api.github.com/repos/shackbarth/xtuple/stargazers","contributors_url":"https://api.github.com/repos/shackbarth/xtuple/contributors","subscribers_url":"https://api.github.com/repos/shackbarth/xtuple/subscribers","subscription_url":"https://api.github.com/repos/shackbarth/xtuple/subscription","commits_url":"https://api.github.com/repos/shackbarth/xtuple/commits{/sha}","git_commits_url":"https://api.github.com/repos/shackbarth/xtuple/git/commits{/sha}","comments_url":"https://api.github.com/repos/shackbarth/xtuple/comments{/number}","issue_comment_url":"https://api.github.com/repos/shackbarth/xtuple/issues/comments/{number}","contents_url":"https://api.github.com/repos/shackbarth/xtuple/contents/{+path}","compare_url":"https://api.github.com/repos/shackbarth/xtuple/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shackbarth/xtuple/merges","archive_url":"https://api.github.com/repos/shackbarth/xtuple/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shackbarth/xtuple/downloads","issues_url":"https://api.github.com/repos/shackbarth/xtuple/issues{/number}","pulls_url":"https://api.github.com/repos/shackbarth/xtuple/pulls{/number}","milestones_url":"https://api.github.com/repos/shackbarth/xtuple/milestones{/number}","notifications_url":"https://api.github.com/repos/shackbarth/xtuple/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shackbarth/xtuple/labels{/name}","releases_url":"https://api.github.com/repos/shackbarth/xtuple/releases{/id}","created_at":"2013-02-13T21:22:24Z","updated_at":"2015-01-09T19:48:41Z","pushed_at":"2015-01-14T15:19:08Z","git_url":"git://github.com/shackbarth/xtuple.git","ssh_url":"git@github.com:shackbarth/xtuple.git","clone_url":"https://github.com/shackbarth/xtuple.git","svn_url":"https://github.com/shackbarth/xtuple","homepage":null,"size":70383,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"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":"xtuple:4_9_x","ref":"4_9_x","sha":"cffbabacdd98f822197d3dfa02c3b97a5c6f468f","user":{"login":"xtuple","id":703922,"avatar_url":"https://avatars.githubusercontent.com/u/703922?v=3","gravatar_id":"","url":"https://api.github.com/users/xtuple","html_url":"https://github.com/xtuple","followers_url":"https://api.github.com/users/xtuple/followers","following_url":"https://api.github.com/users/xtuple/following{/other_user}","gists_url":"https://api.github.com/users/xtuple/gists{/gist_id}","starred_url":"https://api.github.com/users/xtuple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xtuple/subscriptions","organizations_url":"https://api.github.com/users/xtuple/orgs","repos_url":"https://api.github.com/users/xtuple/repos","events_url":"https://api.github.com/users/xtuple/events{/privacy}","received_events_url":"https://api.github.com/users/xtuple/received_events","type":"Organization","site_admin":false},"repo":{"id":8138568,"name":"xtuple","full_name":"xtuple/xtuple","owner":{"login":"xtuple","id":703922,"avatar_url":"https://avatars.githubusercontent.com/u/703922?v=3","gravatar_id":"","url":"https://api.github.com/users/xtuple","html_url":"https://github.com/xtuple","followers_url":"https://api.github.com/users/xtuple/followers","following_url":"https://api.github.com/users/xtuple/following{/other_user}","gists_url":"https://api.github.com/users/xtuple/gists{/gist_id}","starred_url":"https://api.github.com/users/xtuple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xtuple/subscriptions","organizations_url":"https://api.github.com/users/xtuple/orgs","repos_url":"https://api.github.com/users/xtuple/repos","events_url":"https://api.github.com/users/xtuple/events{/privacy}","received_events_url":"https://api.github.com/users/xtuple/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xtuple/xtuple","description":"This repository contains the source code for both the Mobile Web app core and the database schema for the PostBooks edition of xTuple ERP. The Mobile Web app core is written in JavaScript, using the Enyo framework for the client side and Node.js for the datasource layer. The database schema for PostBooks runs on PostgreSQL.","fork":false,"url":"https://api.github.com/repos/xtuple/xtuple","forks_url":"https://api.github.com/repos/xtuple/xtuple/forks","keys_url":"https://api.github.com/repos/xtuple/xtuple/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xtuple/xtuple/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xtuple/xtuple/teams","hooks_url":"https://api.github.com/repos/xtuple/xtuple/hooks","issue_events_url":"https://api.github.com/repos/xtuple/xtuple/issues/events{/number}","events_url":"https://api.github.com/repos/xtuple/xtuple/events","assignees_url":"https://api.github.com/repos/xtuple/xtuple/assignees{/user}","branches_url":"https://api.github.com/repos/xtuple/xtuple/branches{/branch}","tags_url":"https://api.github.com/repos/xtuple/xtuple/tags","blobs_url":"https://api.github.com/repos/xtuple/xtuple/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xtuple/xtuple/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xtuple/xtuple/git/refs{/sha}","trees_url":"https://api.github.com/repos/xtuple/xtuple/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xtuple/xtuple/statuses/{sha}","languages_url":"https://api.github.com/repos/xtuple/xtuple/languages","stargazers_url":"https://api.github.com/repos/xtuple/xtuple/stargazers","contributors_url":"https://api.github.com/repos/xtuple/xtuple/contributors","subscribers_url":"https://api.github.com/repos/xtuple/xtuple/subscribers","subscription_url":"https://api.github.com/repos/xtuple/xtuple/subscription","commits_url":"https://api.github.com/repos/xtuple/xtuple/commits{/sha}","git_commits_url":"https://api.github.com/repos/xtuple/xtuple/git/commits{/sha}","comments_url":"https://api.github.com/repos/xtuple/xtuple/comments{/number}","issue_comment_url":"https://api.github.com/repos/xtuple/xtuple/issues/comments/{number}","contents_url":"https://api.github.com/repos/xtuple/xtuple/contents/{+path}","compare_url":"https://api.github.com/repos/xtuple/xtuple/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xtuple/xtuple/merges","archive_url":"https://api.github.com/repos/xtuple/xtuple/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xtuple/xtuple/downloads","issues_url":"https://api.github.com/repos/xtuple/xtuple/issues{/number}","pulls_url":"https://api.github.com/repos/xtuple/xtuple/pulls{/number}","milestones_url":"https://api.github.com/repos/xtuple/xtuple/milestones{/number}","notifications_url":"https://api.github.com/repos/xtuple/xtuple/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xtuple/xtuple/labels{/name}","releases_url":"https://api.github.com/repos/xtuple/xtuple/releases{/id}","created_at":"2013-02-11T13:33:14Z","updated_at":"2015-01-12T14:28:57Z","pushed_at":"2015-01-12T15:50:07Z","git_url":"git://github.com/xtuple/xtuple.git","ssh_url":"git@github.com:xtuple/xtuple.git","clone_url":"https://github.com/xtuple/xtuple.git","svn_url":"https://github.com/xtuple/xtuple","homepage":"http://www.xtuple.com","size":96657,"stargazers_count":57,"watchers_count":57,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":185,"mirror_url":null,"open_issues_count":79,"forks":185,"open_issues":79,"watchers":57,"default_branch":"4_9_x"}},"_links":{"self":{"href":"https://api.github.com/repos/xtuple/xtuple/pulls/2119"},"html":{"href":"https://github.com/xtuple/xtuple/pull/2119"},"issue":{"href":"https://api.github.com/repos/xtuple/xtuple/issues/2119"},"comments":{"href":"https://api.github.com/repos/xtuple/xtuple/issues/2119/comments"},"review_comments":{"href":"https://api.github.com/repos/xtuple/xtuple/pulls/2119/comments"},"review_comment":{"href":"https://api.github.com/repos/xtuple/xtuple/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/xtuple/xtuple/pulls/2119/commits"},"statuses":{"href":"https://api.github.com/repos/xtuple/xtuple/statuses/bc9107be5ed22b785860aee6938057f519788f13"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":3,"additions":35,"deletions":0,"changed_files":1}}