Fetcher
Fetcher is designed to make retrieving data through Method's really easy. It will run Meteor.call() for you, then deposit the result into a reactive dictionary. Just like a Session variable, you can use that data anywhere in your application, and it persists through hot reloads.
API
Fetcher relies on Meteor.call() to retrieve data from Methods, and Reactive-Dict to return reactive data to Blaze or wherever you may need it.
1// get data from server 2// params are for the method call 3Fetcher.retrieve("taco", "methodName", param1, param2, param3, etc) 4 5// return data 6Fetcher.get("taco") 7 8// modify the data 9Fetcher.set("taco", {'cheese' : 'yes please'}) 10 11// re-run method and update data 12Fetcher.refresh("taco")
Advertisment
Check out Meteor Toys, the insanely handy development tools for Meteor!
Licensed under MIT