mbrien12 / learning-2017

Place for all my tutorial and practice work, with learning resources, plan and backlog
1 stars 1 forks source link

AJAX - Udacity (6 hours) #37

Closed mbrien12 closed 7 years ago

mbrien12 commented 7 years ago

https://classroom.udacity.com/courses/ud110

mbrien12 commented 7 years ago

2 hours on content 2 hours on google api

helpful resources http://api.jquery.com/val/ https://developers.google.com/maps/documentation/streetview/ https://github.com/idavidmcdonald/minicourse-ajax-project/blob/master/js/script.js

Remember! Kept console logging to check .val was being stored (prob spent a few hours on this) and was not showing, but when updated the greeting text with the values it worked so this might be a better way to check in the future.

mbrien12 commented 7 years ago

1 hour on NYT api

Helpful resources http://developer.nytimes.com/article_search_v2.json http://api.jquery.com/jquery.getjson/ https://discussions.udacity.com/t/nyt-ajax-call-not-working/185844

Remember! Use dot notation to access child of json element and can group childs of parent in larger variable e.g. article = data.response.docs

mbrien12 commented 7 years ago

Added Guardian API instead 😊 http://open-platform.theguardian.com/documentation/search

mbrien12 commented 7 years ago

30 mins - error handler added

Helpful resources http://api.jquery.com/error/

Remember! 'chaining' is when you add a method onto bottom of another method (make sure just leave one }) after so within the same method

Can give error a value to re-use later by including e.g. .error(function(name_here)

mbrien12 commented 7 years ago

1.5 hour - adding Wikipedia API with ajax using jsonp

Helpful resources http://api.jquery.com/jquery.ajax/ https://www.mediawiki.org/wiki/API:Main_page#Action-specific_parameters

Remember! To always create a var = to save new bits of data need to re-use

mbrien12 commented 7 years ago

Done https://classroom.udacity.com/courses/ud110/ All here https://github.com/mbrien12/learning-2017/tree/master/Udacity/ajax-project