예제 #1
0
        public JsonResult Leaderboard(int segmentId)
        {
            var     _api = StravaAPI.GetInstance(Access.CurrentAccessToken);
            Segment s    = new Segment(_api.GetSegment(segmentId));

            return(Json(s.Leaderboard, JsonRequestBehavior.AllowGet));
        }
예제 #2
0
        public string Segment(int id)
        {
            Response.ContentType = "application/json charset utf-8";
            var _api = StravaAPI.GetInstance(Access.CurrentAccessToken);

            return(System.Web.Helpers.Json.Encode(_api.GetSegment(id)));
        }