/// <summary> /// Returns a list of achievements /// </summary> /// <param name="userID">The id of a user for user-related searches</param> /// <param name="questID">Use this to return only achievements related to a particular quest.</param> /// <param name="achievementsEarned">Should earned achievements be returned? Requires the userID parameter. Default is true.</param> /// <param name="achievementsNotEarned">Should not-yet-earned achievements be returned? Requires the userID parameter. Default is true.</param> /// <param name="inactiveAchievements">Should inactive achievements be returned? Default is false.</param> /// <param name="createPoints">Require create points?</param> /// <param name="explorePoints">Require explore points?</param> /// <param name="learnPoints">Require learn points?</param> /// <param name="socializePoints">Require socialize points?</param> /// <param name="search">A string for searching</param> /// <returns>A populated view model with a list of achievements</returns> public JsonResult Achievements( int?userID = null, int?questID = null, bool?achievementsEarned = null, bool inactiveAchievements = false, bool?createPoints = null, bool?explorePoints = null, bool?learnPoints = null, bool?socializePoints = null, int?start = null, int?count = null, String search = null) { return(Json( AchievementsListViewModel.Populate( userID, questID, achievementsEarned, inactiveAchievements, createPoints, explorePoints, learnPoints, socializePoints, start, count, search), JsonRequestBehavior.AllowGet)); }
/// <summary> /// Handles the home page of the Achievements section /// </summary> /// <returns>GET: /Achievements</returns> public ActionResult Index() { // Get the list of ALL achievements AchievementsListViewModel model = AchievementsListViewModel.Populate(); return(View(model)); }