Created
July 4, 2012 10:33
-
-
Save danscotton/3046645 to your computer and use it in GitHub Desktop.
emitted events from locator, local and weather
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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