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// modify the data yourself 6Fetcher.set("taco", {'cheese' : 'yes please'}) 7 8// return data to whatever source 9Fetcher.get("taco")
Advertisment
Check out Meteor Toys, the insanely handy development tools for Meteor!
Licensed under MIT