Proxomo.ProxomoApi.Init C# (CSharp) Method

Init() private method

private Init ( string applicationID, string proxomoAPIKey, string version, CommunicationType format, bool validatessl, string url ) : void
applicationID string
proxomoAPIKey string
version string
format CommunicationType
validatessl bool
url string
return void
        private void Init(string applicationID, string proxomoAPIKey, string version, CommunicationType format, bool validatessl, string url)
        {
            APIVersion = version;
            _applicationID = applicationID;
            _proxomoAPIKey = proxomoAPIKey;
            this.ValidateSSLCert = validatessl;
            this.Format = format;

            if (format == CommunicationType.XML)
            {
                contentType = "text/xml";

                if (String.IsNullOrWhiteSpace(url))
                {
                    baseURL = String.Format("https://service.proxomo.com/{0}/xml", APIVersion);
                }
                else
                {
                    baseURL = String.Format("{0}/{1}/xml", url, APIVersion);
                }
            }
            else if (format == CommunicationType.JSON)
            {
                contentType = "application/json";

                if (String.IsNullOrWhiteSpace(url))
                {
                    baseURL = string.Format("https://service.proxomo.com/{0}/json", APIVersion);
                }
                else
                {
                    baseURL = String.Format("{0}/{1}/json", url, APIVersion);
                }
            }

            GetAuthToken();
        }