Missing options for some api endpoints
spoike opened this issue · comments
There are some options that are not passed on, e.g. the user activity feed has a since_id
option that would generate less data over the wire when polling the feed. Only limit
and max_id
is supported.
It'd be nice if you could just pass the params in an object to the function instead. Like this:
untappd.userFeed(cb, user_name, {
since_id: last_id,
limit: 5
});
That way you won't need to maintain the params if new ones show up in the API and this lib can instead just stringify the params instead of what is currently done:
that.userFeed = function(callback, lookupUser, params) {
// snip-snip guard statements
return get("/v4/user/checkins/"+lookupUser, QS.stringify(params), callback);
}
Agreed. A PR would be welcome.
Alright, despite screwing up the merge and having to do it by hand, I think I got this merged in. Please take a look and let me know if I missed something else. Also published new version to NPM.