示例#1
0
        /// <summary>
        /// Asynchronously create an authenticated connection to the Ring API using a Ring account username and password. This should only be used when an auth token has not been created or has expired.
        /// </summary>
        /// <param name="username">Ring account username</param>
        /// <param name="password">Ring account password</param>
        /// <returns></returns>
        public static async Task <RingClient> CreateAsync(string username, string password)
        {
            var ringClient = new RingClient();

            await ringClient.Initialize(username, password);

            return(ringClient);
        }
示例#2
0
        /// <summary>
        /// Asynchronously create an authenticated connection to the Ring API using an auth token.
        /// </summary>
        /// <param name="authToken">Ring API auth token</param>
        /// <returns></returns>
        public static async Task <RingClient> CreateAsync(string authToken)
        {
            var ringClient = new RingClient();

            await ringClient.Initialize(authToken);

            return(ringClient);
        }