{"action":"created","issue":{"url":"https://api.github.com/repos/yesodweb/yesod-scaffold/issues/76","labels_url":"https://api.github.com/repos/yesodweb/yesod-scaffold/issues/76/labels{/name}","comments_url":"https://api.github.com/repos/yesodweb/yesod-scaffold/issues/76/comments","events_url":"https://api.github.com/repos/yesodweb/yesod-scaffold/issues/76/events","html_url":"https://github.com/yesodweb/yesod-scaffold/pull/76","id":85698942,"number":76,"title":"Draft of using Yesod as an API server to a Javascript frontend","user":{"login":"MaxGabriel","id":1274145,"avatar_url":"https://avatars.githubusercontent.com/u/1274145?v=3","gravatar_id":"","url":"https://api.github.com/users/MaxGabriel","html_url":"https://github.com/MaxGabriel","followers_url":"https://api.github.com/users/MaxGabriel/followers","following_url":"https://api.github.com/users/MaxGabriel/following{/other_user}","gists_url":"https://api.github.com/users/MaxGabriel/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxGabriel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxGabriel/subscriptions","organizations_url":"https://api.github.com/users/MaxGabriel/orgs","repos_url":"https://api.github.com/users/MaxGabriel/repos","events_url":"https://api.github.com/users/MaxGabriel/events{/privacy}","received_events_url":"https://api.github.com/users/MaxGabriel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-06-06T05:05:37Z","updated_at":"2015-08-26T06:19:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/yesodweb/yesod-scaffold/pulls/76","html_url":"https://github.com/yesodweb/yesod-scaffold/pull/76","diff_url":"https://github.com/yesodweb/yesod-scaffold/pull/76.diff","patch_url":"https://github.com/yesodweb/yesod-scaffold/pull/76.patch"},"body":"In #73 there was some discussion about adding an example of using Yesod as an API server. I took a quick stab at that; this PR just adds a link you can click on the homepage, which triggers an AJAX request to the server to create a new user. The server inserts the user into the database and returns the data to the client, which updates adds the user to an `<ul>`.\r\n\r\nIs this roughly what we're looking for? I wrote functions to request all users and to delete specific ones as well, if we want to add more API server example code."},"comment":{"url":"https://api.github.com/repos/yesodweb/yesod-scaffold/issues/comments/134853638","html_url":"https://github.com/yesodweb/yesod-scaffold/pull/76#issuecomment-134853638","issue_url":"https://api.github.com/repos/yesodweb/yesod-scaffold/issues/76","id":134853638,"user":{"login":"gregwebs","id":1183,"avatar_url":"https://avatars.githubusercontent.com/u/1183?v=3","gravatar_id":"","url":"https://api.github.com/users/gregwebs","html_url":"https://github.com/gregwebs","followers_url":"https://api.github.com/users/gregwebs/followers","following_url":"https://api.github.com/users/gregwebs/following{/other_user}","gists_url":"https://api.github.com/users/gregwebs/gists{/gist_id}","starred_url":"https://api.github.com/users/gregwebs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregwebs/subscriptions","organizations_url":"https://api.github.com/users/gregwebs/orgs","repos_url":"https://api.github.com/users/gregwebs/repos","events_url":"https://api.github.com/users/gregwebs/events{/privacy}","received_events_url":"https://api.github.com/users/gregwebs/received_events","type":"User","site_admin":false},"created_at":"2015-08-26T06:19:06Z","updated_at":"2015-08-26T06:19:06Z","body":"published"}}