module-and-template-store/app/assets/stylesheets/home.js.coffee

19 lines
736 B
CoffeeScript

# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
$.ajax({
type: 'POST',
url: 'oauth/token.json',
# url: 'http://api.geonames.org/citiesJSON',
dataType: 'JSON',
data: {
grant_type: 'client_credentials',
client_id: '8dae7e34b1ba624e601cf659b65a70fa92d1c408d1f18252f9c0119b3efdce8d',
client_secret: 'e11386baaa4cd9a2327ce3a170ec7ae74d88c5ed618342852492f7603e065cb9'
},
success: (d, textStatus, jqXHR) ->
console.debug d, textStatus
error: (jqXHR, textStatus, errorThrown) ->
console.debug jqXHR, textStatus, errorThrown
})