Comparing version 1.9.0 to 1.10.0
@@ -170,2 +170,16 @@ /** | ||
}; | ||
activities.listRelated = function(args,done) { | ||
var endpoint = 'activities/' | ||
, err = null; | ||
if(typeof args.id === 'undefined') { | ||
err = {msg:'args must include an activity id'}; | ||
return done(err); | ||
} | ||
endpoint += args.id + '/related'; | ||
this._listHelper(endpoint,args,done); | ||
}; | ||
//===== activities endpoint ===== | ||
@@ -172,0 +186,0 @@ |
{ | ||
"name": "strava-v3", | ||
"version": "1.9.0", | ||
"version": "1.10.0", | ||
"description": "Simple wrapper for strava v3 api", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -169,2 +169,3 @@ | ||
* `strava.athlete.listRoutes(args,done)` | ||
* `strava.athlete.listClubs(args,done)` | ||
@@ -192,2 +193,3 @@ Athletes: | ||
* `strava.activities.listPhotos(args,done)` | ||
* `strava.activities.listRelated(args,done)` | ||
@@ -194,0 +196,0 @@ Clubs: |
@@ -194,2 +194,23 @@ /** | ||
//TODO ideally we'd test for some real related activities but since we created a | ||
// fake activity without location data, there are no related activities. | ||
describe('#listRelated()', function () { | ||
it('should list activities related to activity', function(done) { | ||
strava.activities.listRelated({id:testActivity.id}, function (err, payload) { | ||
if (!err) { | ||
//console.log(payload); | ||
payload.should.be.instanceof(Array); | ||
} | ||
else { | ||
console.log(err); | ||
} | ||
done(); | ||
}); | ||
}); | ||
}); | ||
describe('#delete()', function () { | ||
@@ -196,0 +217,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
65290
1693
254