Example #1
0
        /// <summary>
        /// Watches a repository for the authenticated user.
        /// </summary>
        /// <param name="owner">The owner of the repository to star</param>
        /// <param name="name">The name of the repository to star</param>
        /// <param name="newSubscription">A <see cref="NewSubscription"/> instance describing the new subscription to create</param>
        /// <returns>A <c>bool</c> representing the success of watching</returns>
        public Task <Subscription> WatchRepo(string owner, string name, NewSubscription newSubscription)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");
            Ensure.ArgumentNotNull(newSubscription, "newSubscription");

            return(ApiConnection.Put <Subscription>(ApiUrls.Watched(owner, name), newSubscription));
        }
Example #2
0
        /// <summary>
        /// Watches a repository for the authenticated user.
        /// </summary>
        /// <param name="owner">The owner of the repository to star</param>
        /// <param name="name">The name of the repository to star</param>
        /// <param name="newSubscription">A <see cref="NewSubscription"/> instance describing the new subscription to create</param>
        /// <returns>A <c>bool</c> representing the success of watching</returns>
        public Task<Subscription> WatchRepo(string owner, string name, NewSubscription newSubscription)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");
            Ensure.ArgumentNotNull(newSubscription, "newSubscription");

            return ApiConnection.Put<Subscription>(ApiUrls.Watched(owner, name), newSubscription);
        }
Example #3
0
        /// <summary>
        /// Watches a repository for the authenticated user.
        /// </summary>
        /// <param name="repositoryId">The Id of the repository</param>
        /// <param name="newSubscription">A <see cref="NewSubscription"/> instance describing the new subscription to create</param>
        public Task <Subscription> WatchRepo(long repositoryId, NewSubscription newSubscription)
        {
            Ensure.ArgumentNotNull(newSubscription, nameof(newSubscription));

            return(ApiConnection.Put <Subscription>(ApiUrls.Watched(repositoryId), newSubscription));
        }
Example #4
0
        /// <summary>
        /// Watches a repository for the authenticated user.
        /// </summary>
        /// <param name="repositoryId">The Id of the repository</param>
        /// <param name="newSubscription">A <see cref="NewSubscription"/> instance describing the new subscription to create</param>
        public Task<Subscription> WatchRepo(long repositoryId, NewSubscription newSubscription)
        {
            Ensure.ArgumentNotNull(newSubscription, "newSubscription");

            return ApiConnection.Put<Subscription>(ApiUrls.Watched(repositoryId), newSubscription);
        }