Implementing APIs with jQuery and AJAX