Esempio n. 1
0
        private void GetAuthToken()
        {
            string url = string.Format("{0}/security/accesstoken/get?applicationid={1}&proxomoAPIKey={2}", baseURL, HttpUtility.UrlEncode(_applicationID), HttpUtility.UrlEncode(_proxomoAPIKey));

            using (ProxomoWebRequest<Token> p = new ProxomoWebRequest<Token>(ValidateSSLCert, Format))
            {
                //AuthToken = p.GetData(url, "GET", string.Empty);
                //AuthToken.ExpiresDate = Utility.ConvertFromUnixTimestamp(AuthToken.Expires);
            }
        }
Esempio n. 2
0
        //public delegate void AppDataAddEventHandler(object e);
        //public event AppDataAddEventHandler AppDataAdd_Complete;
        public void AppDataAdd(AppData appData)
        {
            string url = string.Format("{0}/appdata", baseURL);

            using (ProxomoWebRequest<string> p = new ProxomoWebRequest<string>(AuthToken.AccessToken, ValidateSSLCert, Format))
            {
                //  **************    Replace NULL with Callback  *********************
                p.GetDataItem(url, "POST", contentType, Converter.Convert(appData, Format, false), null);
            }
        }