Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/runkeeper.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ HealthGraph.prototype.apiCall = function(opts, callback) {
* If passed opts.get_next it will get all items of the activity feed until there is no more
* `data.next`.
*
* If passed opts.modified_since you might get an empty response (304 Not Modified). In those cases callback(null, []) will be called
*
* @param {Object} opts (Optional) Gets extended by `resources.fitnessActivityFeed`.
* @param {Function} callback Given err and data.
*/
Expand All @@ -157,6 +159,7 @@ HealthGraph.prototype.activityFeed = function(opts, callback) {

this.apiCall(opts, function(err, data) {
if (err) return callback(err, null);
if (!data.items) return callback(null, []);

if (data.next) {
opts.items = data.items.concat(opts.items);
Expand Down