public StravaActivityController(Database db, StravaApi stravaApi, DarkSkyApi darkSkyApi, ILogger <StravaActivityController> logger) { this.logger = logger; this.db = db; this.stravaApi = stravaApi; this.darkSkyApi = darkSkyApi; }
/// <summary> /// Retrieves an Effort by id. /// </summary> /// <param name="id"></param> /// <returns>The Effort.</returns> public static Effort ById(long id) { var stravaEffortResponse = StravaApi.Call(string.Format("efforts/{0}", id)); if (stravaEffortResponse == null) { return(null); } return(new Effort(stravaEffortResponse.effort)); }