Exemple #1
0
        /// <summary>
        /// Constructor Name        : GetMoveList
        /// Author                  : Pratik Soni
        /// Creation Date           : 15 Feb 2018
        /// Purpose                 : To get list of active Moves from JIM
        /// Revision                :
        /// </summary>
        public List <MoveModel> GetMoveList(string statusReason)
        {
            try
            {
                string apiURL = General.GetAPIPath(resourceManager.GetString("MoveService"), "list/" + statusReason);

                HttpResponseMessage httpResponseMessage = apiHelper.InvokeGetAPI(apiURL);
                if (!httpResponseMessage.IsSuccessStatusCode)
                {
                    APIResponse <List <MoveModel> > serviceResponse = General.ConvertFromJson <APIResponse <List <MoveModel> > >(httpResponseMessage.RequestMessage.ToString());
                    return(serviceResponse.Data);
                }
                return(new List <MoveModel>());
            }
            catch (System.Exception ex)
            {
                logger.Error("Error occured: ", ex);
                return(new List <MoveModel>());
            }
        }