Ejemplo n.º 1
0
        /// <summary>
        /// The GetResponse method is used to get response of the requested loginradius api
        /// </summary>
        /// <typeparam name="T">T refers as loginradius model classes</typeparam>
        /// <param name="api">Requested loginradius api</param>
        /// <returns></returns>
        public T GetResponse <T>(ILoginRadiusAPI api) where T : class, new()
        {
            if (api == null)
            {
                throw new ArgumentNullException("api");
            }
            else
            {
                try
                {
                    var response           = GetResponse(api);
                    var deserializedobject = jsserializer.Deserialize <T>(response);
                    return(deserializedobject);
                }
                catch { }

                return(null);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// The GetResponse method is used to get provider response of the requested loginradius api
 /// </summary>
 /// <param name="api">Requested loginradius api</param>
 /// <returns></returns>
 public string GetRawResponse(ILoginRadiusAPI api)
 {
     return(api.ExecuteRawAPI(_token.access_token));
 }