RepositoryHookById() публичный статический Метод

Returns the Uri that gets the repository hook for the specified reference.
public static RepositoryHookById ( long repositoryId, int hookId ) : Uri
repositoryId long The Id of the repository
hookId int The identifier of the repository hook
Результат Uri
Пример #1
0
        /// <summary>
        /// Gets a single hook by Id
        /// </summary>
        /// <param name="owner">The repository's owner</param>
        /// <param name="name">The repository's name</param>
        /// <param name="hookId">The repository's hook id</param>
        /// <remarks>See <a href="http://developer.github.com/v3/repos/hooks/#get-single-hook">API documentation</a> for more information.</remarks>
        public Task <RepositoryHook> Get(string owner, string name, int hookId)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");

            return(ApiConnection.Get <RepositoryHook>(ApiUrls.RepositoryHookById(owner, name, hookId)));
        }
        /// <summary>
        /// Deletes a hook for a repository
        /// </summary>
        /// <remarks>See <a href="http://developer.github.com/v3/repos/hooks/#delete-a-hook">API documentation</a> for more information.</remarks>
        /// <returns></returns>
        public Task Delete(string owner, string repositoryName, int hookId)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(repositoryName, "repositoryName");

            return(ApiConnection.Delete(ApiUrls.RepositoryHookById(owner, repositoryName, hookId)));
        }
Пример #3
0
        public Task Delete(string owner, string name, int hookId)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
            Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));

            return(ApiConnection.Delete(ApiUrls.RepositoryHookById(owner, name, hookId)));
        }
Пример #4
0
        /// <summary>
        /// Edits a hook for a repository
        /// </summary>
        /// <param name="owner">The repository's owner</param>
        /// <param name="name">The repository's name</param>
        /// <param name="hookId">The repository's hook id</param>
        /// <param name="hook">The requested changes to an edit repository hook</param>
        /// <remarks>See <a href="http://developer.github.com/v3/repos/hooks/#edit-a-hook">API documentation</a> for more information.</remarks>
        public Task <RepositoryHook> Edit(string owner, string name, int hookId, EditRepositoryHook hook)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");
            Ensure.ArgumentNotNull(hook, "hook");

            return(ApiConnection.Patch <RepositoryHook>(ApiUrls.RepositoryHookById(owner, name, hookId), hook));
        }
Пример #5
0
 /// <summary>
 /// Gets a single hook by Id
 /// </summary>
 /// <param name="repositoryId">The Id of the repository</param>
 /// <param name="hookId">The repository's hook id</param>
 /// <remarks>See <a href="http://developer.github.com/v3/repos/hooks/#get-single-hook">API documentation</a> for more information.</remarks>
 public Task <RepositoryHook> Get(long repositoryId, int hookId)
 {
     return(ApiConnection.Get <RepositoryHook>(ApiUrls.RepositoryHookById(repositoryId, hookId)));
 }
Пример #6
0
 /// <summary>
 /// Deletes a hook for a repository
 /// </summary>
 /// <param name="repositoryId">The Id of the repository</param>
 /// <param name="hookId">The repository's hook id</param>
 /// <remarks>See <a href="http://developer.github.com/v3/repos/hooks/#delete-a-hook">API documentation</a> for more information.</remarks>
 public Task Delete(long repositoryId, int hookId)
 {
     return(ApiConnection.Delete(ApiUrls.RepositoryHookById(repositoryId, hookId)));
 }
Пример #7
0
        /// <summary>
        /// Edits a hook for a repository
        /// </summary>
        /// <param name="repositoryId">The Id of the repository</param>
        /// <param name="hookId">The repository's hook id</param>
        /// <param name="hook">The requested changes to an edit repository hook</param>
        /// <remarks>See <a href="http://developer.github.com/v3/repos/hooks/#edit-a-hook">API documentation</a> for more information.</remarks>
        public Task <RepositoryHook> Edit(long repositoryId, int hookId, EditRepositoryHook hook)
        {
            Ensure.ArgumentNotNull(hook, "hook");

            return(ApiConnection.Patch <RepositoryHook>(ApiUrls.RepositoryHookById(repositoryId, hookId), hook));
        }