Example #1
0
        /// <summary>
        /// Get response
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="path"></param>
        /// <param name="data"></param>
        /// <returns></returns>
        private T PostRequest <T>(string path, object data) where T : class
        {
            var url = string.Format("{0}/{1}?oauth2_access_token={2}", URLBase, path, AccessToken);

            return(SerializeUtilities.DeserializeXml <T>(WebUtilities.PostRequest(url, data)));
        }
Example #2
0
        /// <summary>
        /// Get response
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="path"></param>
        /// <returns></returns>
        private T GetResponse <T>(string path) where T : class
        {
            var url = string.Format("{0}/{1}?oauth2_access_token={2}", URLBase, path, AccessToken);

            return(SerializeUtilities.DeserializeXml <T>(WebUtilities.GetRequest(url)));
        }