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

Returns the Uri that lists the repository hooks for the specified reference.
public static RepositoryHooks ( long repositoryId ) : Uri
repositoryId long The Id of the repository
Результат Uri
Пример #1
0
        /// <summary>
        /// Gets the list of hooks defined for a repository
        /// </summary>
        /// <param name="owner">The repository's owner</param>
        /// <param name="name">The repository's name</param>
        /// <param name="options">Options for changing the API response</param>
        /// <remarks>See <a href="http://developer.github.com/v3/repos/hooks/#list">API documentation</a> for more information.</remarks>
        public Task <IReadOnlyList <RepositoryHook> > GetAll(string owner, string name, ApiOptions options)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");
            Ensure.ArgumentNotNull(options, "options");

            return(ApiConnection.GetAll <RepositoryHook>(ApiUrls.RepositoryHooks(owner, name), options));
        }
Пример #2
0
        /// <summary>
        /// Creates a hook for a repository
        /// </summary>
        /// <param name="owner">The repository's owner</param>
        /// <param name="name">The repository's name</param>
        /// <param name="hook">The hook's parameters</param>
        /// <remarks>See <a href="http://developer.github.com/v3/repos/hooks/#create-a-hook">API documentation</a> for more information.</remarks>
        public Task <RepositoryHook> Create(string owner, string name, NewRepositoryHook hook)
        {
            Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
            Ensure.ArgumentNotNullOrEmptyString(name, "name");
            Ensure.ArgumentNotNull(hook, "hook");

            return(ApiConnection.Post <RepositoryHook>(ApiUrls.RepositoryHooks(owner, name), hook.ToRequest()));
        }
Пример #3
0
        /// <summary>
        /// Gets the list of hooks defined for a repository
        /// </summary>
        /// <param name="repositoryId">The Id of the repository</param>
        /// <param name="options">Options for changing the API response</param>
        /// <remarks>See <a href="http://developer.github.com/v3/repos/hooks/#list">API documentation</a> for more information.</remarks>
        public Task <IReadOnlyList <RepositoryHook> > GetAll(long repositoryId, ApiOptions options)
        {
            Ensure.ArgumentNotNull(options, "options");

            return(ApiConnection.GetAll <RepositoryHook>(ApiUrls.RepositoryHooks(repositoryId), options));
        }
Пример #4
0
        /// <summary>
        /// Creates a hook for a repository
        /// </summary>
        /// <param name="repositoryId">The Id of the repository</param>
        /// <param name="hook">The hook's parameters</param>
        /// <remarks>See <a href="http://developer.github.com/v3/repos/hooks/#create-a-hook">API documentation</a> for more information.</remarks>
        public Task <RepositoryHook> Create(long repositoryId, NewRepositoryHook hook)
        {
            Ensure.ArgumentNotNull(hook, "hook");

            return(ApiConnection.Post <RepositoryHook>(ApiUrls.RepositoryHooks(repositoryId), hook.ToRequest()));
        }