Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a eventSource config parameter #1

Open
der-On opened this issue Feb 22, 2015 · 1 comment
Open

Provide a eventSource config parameter #1

der-On opened this issue Feb 22, 2015 · 1 comment

Comments

@der-On
Copy link
Owner

der-On commented Feb 22, 2015

Source can be an array or async function.

If it's a function an example could look like this:

new Calendar({
  eventSource: function(from, to, callback) {
     request.get('/events/?from=' + from.toString() + '&to=' + to.toString(),
       function(err, res) {
         callback(err, res.events || []);
       })
   }
});
@der-On
Copy link
Owner Author

der-On commented Feb 21, 2020

Add support for promises and async/await

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant