Tutorial by Examples

Conceptually, integrate 3rd party REST APIs can be as simple as adding the http package and making a call to the external endpoint. meteor add http HTTP.get('http://foo.net/api/bar/');
Basic HTTP calls don't provide code-reusability, however. And they can get confused with all the other features you're trying to implement. For those reasons, it's common to implement an API wrapper. Foo = { identify: function(input){ return Http.get('http://foo.net/api/identify/' + input...
After creating an API wrapper, it's likely that you may want to create an Atmosphere package to redistribute it and share it between applications. The files of your package will probably look something like this. packages/foo-api-wrapper/package.js packages/foo-api-wrapper/readme.md packages/foo-...
At this point, you're still building your package, so you'll need to add the package to your application: meteor add myaccount:foo And eventually publish it to Atmosphere: meteor publish myaccount:foo
Now that we have all those pieces put together, you should now be able to make calls like the following from within your app: Foo.identify('John'); Foo.record_action_on_item('view', "HackerNews'); Obviously you'll want to adjust function names, arguments, urls, and the like, to create the ...

Page 1 of 1