Skip to content

Instantly share code, notes, and snippets.

@danscotton
Created July 4, 2012 10:33
Show Gist options
  • Select an option

  • Save danscotton/3046645 to your computer and use it in GitHub Desktop.

Select an option

Save danscotton/3046645 to your computer and use it in GitHub Desktop.
emitted events from locator, local and weather
// LOCATOR
locator:error [response, actionType]
locator:renderChangePrompt
locator:renderForm
locator:open [selectorString]
locator:close
locator:locationChanged [location] <---- maybe we should listen to this?
locator:renderWait
locator:searchResults [data]
locator:newsLocalRegions [data]
locator:locationOutOfContext [data]
locator:geoLocation [position]
locator:submitSearch [searchTerm, offset]
locator:submitLocation [locationId, newsRegionId]
// LOCAL
local:requestStarted
local:newsReceived [response, location.news.path]
local:requestError
local:locationInvalid
// WEATHER
weather:requestStarted
weather:success [response, location.id]
weather:requestError [error]
// data passed to locationChanged listeners:
locator:locationChanged [location]
location = {
id: '6691484',
name: 'Oxford Circus',
news: {
id: '40',
path: 'england/london'
},
weather: {
id: '8'
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment