예제 #1
0
        /// <summary>
        /// ApiSession constructor. Check if all parameters seems good.
        /// </summary>
        public ApiSession(string clientId, string clientSecret, string hostRedirect, int portRedirect,
                          string accessToken = null, string refreshToken = null)
        {
            // Set properties
            ClientId     = clientId;
            ClientSecret = clientSecret;
            HostRedirect = hostRedirect;
            PortRedirect = portRedirect;
            AccessToken  = accessToken;
            RefreshToken = refreshToken;

            // Set fields
            Authentication = new EndPoints.Authentication(this);
            Calls          = new EndPoints.Calls(this);
            Contacts       = new EndPoints.Contacts(this);
            Devices        = new EndPoints.Devices(this);
            Sms            = new EndPoints.Sms(this);
            Tokens         = new EndPoints.Tokens(this);
            Users          = new EndPoints.Users(this);
            Vms            = new EndPoints.Vms(this);
        }
예제 #2
0
 /// <summary/>
 public void Disconnect()
 {
     EndPoints.Authentication auth = new EndPoints.Authentication(this);
     auth.Logout();
 }