{"action":"created","comment":{"url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/pulls/comments/84585647","pull_request_review_id":5356628,"id":84585647,"diff_hunk":"@@ -162,68 +164,80 @@ $(document).ready(function(){\n   })\n })\n ```\n-> This is kind of similar to when we used HTTParty synchronously on the back-end!\n \n-> You'll notice there are 3 functions that are tacked onto the AJAX call. These are known as promises. Promises are just callbacks that may or may not happen. A promise represents the future result of an asynchronous operation. In the `.done()` promise if that ajax is executed successfully, the block of code inside it will execute. In the `.fail()` promise, if that ajax is not executed successfully, the block of code inside it will execute. In the `.always()` promise, code block inside will always occur regardless of the ajax's success.\n+> AJAX is given to us through the jQuery library. Like all jQuery methods, [it is just running vanilla Javascript under the good](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest).\n+\n+You'll notice there are 3 functions chained onto the AJAX call. These are known as **promises**. Promises are callbacks that may or may not happen. A promise represents the future result of an asynchronous operation.\n+\n+* `.done()` - this code is run if the AJAX call is successful\n+* `.fail()` - this code is run if the AJAX call is not successful\n+* `.always()` - this code is always run, regardless of whether the AJAX call is successful or not\n \n But how do we go about accessing that big JSON object we saw before? By passing in an argument to the anonymous function callback. The `$.ajax` call returns a response that you can then pass in as an argument to the promise.\n \n ```js\n-// `response` contains the actual response from the ajax call.\n .done(function(response)(){\n   console.log(response)\n })\n ```\n \n-We can drill through this response just like any other JS object.\n+> `response` contains the information received from the AJAX call.\n+\n+We can drill through this response just like any other JS object...\n \n ```js\n-// Note that we use traditional Javascript object notation to access the response.\n .done(function(response)(){\n   console.log(response.current_observation.temp_f)\n })\n ```\n \n-## YOU DO: DOM Manipulation Using Response Data (10/60)\n+> Note that we use traditional Javascript object notation to access the response.\n+\n+## You Do: DOM Manipulation Using Response Data (10 minutes / 0:55)\n \n-Take our existing code for the the weather underground app. Instead of logging the temperature, the `.done()` promise should create a div with the current wind speed in mph.  \n+Take our existing code for the the weather underground app. Instead of logging the temperature, the `.done()` promise should add a div to the page that contains the current wind speed in MPH.  \n \n-### Bonus\n-  1. Create an input text field for City and State in the HTML.  \n-  2. Have the endpoint url change dynamically based on user input to generate a div about current weather in that area.  \n+#### Bonus\n \n-## Break (10/70)\n+1. Create an input text field for City and State in the HTML.  \n+2. Have the endpoint url change dynamically based on user input to generate a div about current weather in that area.  \n \n-## Intro: AJAX and CRUD (5/75)\n-So we've used AJAX to do an asynchronous `GET` request to a 3rd party API. More often than not, 3rd party API's are usually read only. They probably don't want just anyone to be able to update the weather however they want. That is not to say that kind of functionality doesn't exist, we just don't have access to it.\n+## Break (10 minutes / 1:05)\n \n-It just so happens we've built a new Rails API where we can do full CRUD with AJAX. Go ahead and fork and clone [this repo](https://github.com/ga-dc/tunr_ajax).\n+## Intro: AJAX and CRUD (5 minutes / 1:10)\n+\n+So we've used AJAX to do an asynchronous `GET` request to an API. More often than not, 3rd party API's are read-only. They probably don't want just anyone to be able to update the weather however they want. That is not to say that kind of functionality doesn't exist, we just don't have access to it.\n+\n+It just so happens we've built a Tunr Rails API where we can do full CRUD with AJAX. Go ahead and fork and clone [this repo](https://github.com/ga-dc/tunr_ajax).","path":"readme.md","position":229,"original_position":229,"commit_id":"3f375323e9281f1177755dcff56eed9ae6a539d8","original_commit_id":"3f375323e9281f1177755dcff56eed9ae6a539d8","user":{"login":"jshawl","id":3824954,"avatar_url":"https://avatars.githubusercontent.com/u/3824954?v=3","gravatar_id":"","url":"https://api.github.com/users/jshawl","html_url":"https://github.com/jshawl","followers_url":"https://api.github.com/users/jshawl/followers","following_url":"https://api.github.com/users/jshawl/following{/other_user}","gists_url":"https://api.github.com/users/jshawl/gists{/gist_id}","starred_url":"https://api.github.com/users/jshawl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshawl/subscriptions","organizations_url":"https://api.github.com/users/jshawl/orgs","repos_url":"https://api.github.com/users/jshawl/repos","events_url":"https://api.github.com/users/jshawl/events{/privacy}","received_events_url":"https://api.github.com/users/jshawl/received_events","type":"User","site_admin":false},"body":"ga-wdi-exercises","created_at":"2016-10-22T21:25:11Z","updated_at":"2016-10-22T21:28:06Z","html_url":"https://github.com/ga-wdi-lessons/js-ajax/pull/2#discussion_r84585647","pull_request_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/pulls/comments/84585647"},"html":{"href":"https://github.com/ga-wdi-lessons/js-ajax/pull/2#discussion_r84585647"},"pull_request":{"href":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/pulls/2","id":90483919,"html_url":"https://github.com/ga-wdi-lessons/js-ajax/pull/2","diff_url":"https://github.com/ga-wdi-lessons/js-ajax/pull/2.diff","patch_url":"https://github.com/ga-wdi-lessons/js-ajax/pull/2.patch","issue_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/issues/2","number":2,"state":"open","locked":false,"title":"wdi12 update","user":{"login":"amaseda","id":3519147,"avatar_url":"https://avatars.githubusercontent.com/u/3519147?v=3","gravatar_id":"","url":"https://api.github.com/users/amaseda","html_url":"https://github.com/amaseda","followers_url":"https://api.github.com/users/amaseda/followers","following_url":"https://api.github.com/users/amaseda/following{/other_user}","gists_url":"https://api.github.com/users/amaseda/gists{/gist_id}","starred_url":"https://api.github.com/users/amaseda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amaseda/subscriptions","organizations_url":"https://api.github.com/users/amaseda/orgs","repos_url":"https://api.github.com/users/amaseda/repos","events_url":"https://api.github.com/users/amaseda/events{/privacy}","received_events_url":"https://api.github.com/users/amaseda/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-22T14:37:47Z","updated_at":"2016-10-22T21:28:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d0099e4d0719e72f302e270f4317683b8a258eb4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/pulls/2/commits","review_comments_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/pulls/2/comments","review_comment_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/issues/2/comments","statuses_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/statuses/3f375323e9281f1177755dcff56eed9ae6a539d8","head":{"label":"ga-wdi-lessons:wdi12","ref":"wdi12","sha":"3f375323e9281f1177755dcff56eed9ae6a539d8","user":{"login":"ga-wdi-lessons","id":16711211,"avatar_url":"https://avatars.githubusercontent.com/u/16711211?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-wdi-lessons","html_url":"https://github.com/ga-wdi-lessons","followers_url":"https://api.github.com/users/ga-wdi-lessons/followers","following_url":"https://api.github.com/users/ga-wdi-lessons/following{/other_user}","gists_url":"https://api.github.com/users/ga-wdi-lessons/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-wdi-lessons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-wdi-lessons/subscriptions","organizations_url":"https://api.github.com/users/ga-wdi-lessons/orgs","repos_url":"https://api.github.com/users/ga-wdi-lessons/repos","events_url":"https://api.github.com/users/ga-wdi-lessons/events{/privacy}","received_events_url":"https://api.github.com/users/ga-wdi-lessons/received_events","type":"Organization","site_admin":false},"repo":{"id":50125599,"name":"js-ajax","full_name":"ga-wdi-lessons/js-ajax","owner":{"login":"ga-wdi-lessons","id":16711211,"avatar_url":"https://avatars.githubusercontent.com/u/16711211?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-wdi-lessons","html_url":"https://github.com/ga-wdi-lessons","followers_url":"https://api.github.com/users/ga-wdi-lessons/followers","following_url":"https://api.github.com/users/ga-wdi-lessons/following{/other_user}","gists_url":"https://api.github.com/users/ga-wdi-lessons/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-wdi-lessons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-wdi-lessons/subscriptions","organizations_url":"https://api.github.com/users/ga-wdi-lessons/orgs","repos_url":"https://api.github.com/users/ga-wdi-lessons/repos","events_url":"https://api.github.com/users/ga-wdi-lessons/events{/privacy}","received_events_url":"https://api.github.com/users/ga-wdi-lessons/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ga-wdi-lessons/js-ajax","description":"[js,ajax]","fork":false,"url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax","forks_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/forks","keys_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/teams","hooks_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/hooks","issue_events_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/issues/events{/number}","events_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/events","assignees_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/assignees{/user}","branches_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/branches{/branch}","tags_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/tags","blobs_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/git/refs{/sha}","trees_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/statuses/{sha}","languages_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/languages","stargazers_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/stargazers","contributors_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/contributors","subscribers_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/subscribers","subscription_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/subscription","commits_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/commits{/sha}","git_commits_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/git/commits{/sha}","comments_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/comments{/number}","issue_comment_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/issues/comments{/number}","contents_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/contents/{+path}","compare_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/merges","archive_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/downloads","issues_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/issues{/number}","pulls_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/pulls{/number}","milestones_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/milestones{/number}","notifications_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/labels{/name}","releases_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/releases{/id}","deployments_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/deployments","created_at":"2016-01-21T17:51:12Z","updated_at":"2016-06-07T14:22:33Z","pushed_at":"2016-10-22T14:37:47Z","git_url":"git://github.com/ga-wdi-lessons/js-ajax.git","ssh_url":"git@github.com:ga-wdi-lessons/js-ajax.git","clone_url":"https://github.com/ga-wdi-lessons/js-ajax.git","svn_url":"https://github.com/ga-wdi-lessons/js-ajax","homepage":null,"size":15,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"ga-wdi-lessons:master","ref":"master","sha":"e726d4e9a7ca501cce5e5b62ade1809b73d86303","user":{"login":"ga-wdi-lessons","id":16711211,"avatar_url":"https://avatars.githubusercontent.com/u/16711211?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-wdi-lessons","html_url":"https://github.com/ga-wdi-lessons","followers_url":"https://api.github.com/users/ga-wdi-lessons/followers","following_url":"https://api.github.com/users/ga-wdi-lessons/following{/other_user}","gists_url":"https://api.github.com/users/ga-wdi-lessons/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-wdi-lessons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-wdi-lessons/subscriptions","organizations_url":"https://api.github.com/users/ga-wdi-lessons/orgs","repos_url":"https://api.github.com/users/ga-wdi-lessons/repos","events_url":"https://api.github.com/users/ga-wdi-lessons/events{/privacy}","received_events_url":"https://api.github.com/users/ga-wdi-lessons/received_events","type":"Organization","site_admin":false},"repo":{"id":50125599,"name":"js-ajax","full_name":"ga-wdi-lessons/js-ajax","owner":{"login":"ga-wdi-lessons","id":16711211,"avatar_url":"https://avatars.githubusercontent.com/u/16711211?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-wdi-lessons","html_url":"https://github.com/ga-wdi-lessons","followers_url":"https://api.github.com/users/ga-wdi-lessons/followers","following_url":"https://api.github.com/users/ga-wdi-lessons/following{/other_user}","gists_url":"https://api.github.com/users/ga-wdi-lessons/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-wdi-lessons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-wdi-lessons/subscriptions","organizations_url":"https://api.github.com/users/ga-wdi-lessons/orgs","repos_url":"https://api.github.com/users/ga-wdi-lessons/repos","events_url":"https://api.github.com/users/ga-wdi-lessons/events{/privacy}","received_events_url":"https://api.github.com/users/ga-wdi-lessons/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ga-wdi-lessons/js-ajax","description":"[js,ajax]","fork":false,"url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax","forks_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/forks","keys_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/teams","hooks_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/hooks","issue_events_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/issues/events{/number}","events_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/events","assignees_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/assignees{/user}","branches_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/branches{/branch}","tags_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/tags","blobs_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/git/refs{/sha}","trees_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/statuses/{sha}","languages_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/languages","stargazers_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/stargazers","contributors_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/contributors","subscribers_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/subscribers","subscription_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/subscription","commits_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/commits{/sha}","git_commits_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/git/commits{/sha}","comments_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/comments{/number}","issue_comment_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/issues/comments{/number}","contents_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/contents/{+path}","compare_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/merges","archive_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/downloads","issues_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/issues{/number}","pulls_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/pulls{/number}","milestones_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/milestones{/number}","notifications_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/labels{/name}","releases_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/releases{/id}","deployments_url":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/deployments","created_at":"2016-01-21T17:51:12Z","updated_at":"2016-06-07T14:22:33Z","pushed_at":"2016-10-22T14:37:47Z","git_url":"git://github.com/ga-wdi-lessons/js-ajax.git","ssh_url":"git@github.com:ga-wdi-lessons/js-ajax.git","clone_url":"https://github.com/ga-wdi-lessons/js-ajax.git","svn_url":"https://github.com/ga-wdi-lessons/js-ajax","homepage":null,"size":15,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/pulls/2"},"html":{"href":"https://github.com/ga-wdi-lessons/js-ajax/pull/2"},"issue":{"href":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/issues/2"},"comments":{"href":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/ga-wdi-lessons/js-ajax/statuses/3f375323e9281f1177755dcff56eed9ae6a539d8"}}}}
{"actor":{"display_login":"jshawl"}}