示例#1
0
        /// <summary>
        /// Unstars a repository for the authenticated user.
        /// </summary>
        /// <param name="owner">The owner of the repository to unstar</param>
        /// <param name="name">The name of the repository to unstar</param>
        /// <returns>A <c>bool</c> representing the success of the operation</returns>
        public async Task <bool> RemoveStarFromRepo(string owner, string name)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");

            try
            {
                var statusCode = await Connection.DeleteAsync(ApiUrls.Starred(owner, name))
                                 .ConfigureAwait(false);

                return(statusCode == HttpStatusCode.NoContent);
            }
            catch (NotFoundException)
            {
                return(false);
            }
        }