using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Threading.Tasks;
namespace Octokit
{
///
/// A client for GitHub's Organization Webhooks API.
///
///
/// See the Webhooks API documentation for more information.
///
public interface IOrganizationHooksClient
{
///
/// Gets the list of hooks defined for a organization
///
/// The organizations name
/// See API documentation for more information.
Task> GetAll(string org);
///
/// Gets the list of hooks defined for a organization
///
/// The organizations name
/// Options for changing the API response
/// See API documentation for more information.
Task> GetAll(string org, ApiOptions options);
///
/// Gets a single hook by Id
///
/// The organizations name
/// The repository's hook id
/// See API documentation for more information.
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get", Justification = "This is ok; we're matching HTTP verbs not keywords")]
Task Get(string org, int hookId);
///
/// Creates a hook for a organization
///
/// The organizations name
/// The hook's parameters
/// See API documentation for more information.
Task Create(string org, NewOrganizationHook hook);
///
/// Edits a hook for a organization
///
/// The organizations name
/// The organizations hook id
/// The hook's parameters
/// See API documentation for more information.
Task Edit(string org, int hookId, EditOrganizationHook hook);
///
/// This will trigger a ping event to be sent to the hook.
///
/// The organizations name
/// The organizations hook id
/// See API documentation for more information.
Task Ping(string org, int hookId);
///
/// Deletes a hook for a organization
///
/// The organizations name
/// The organizations hook id
/// See API documentation for more information.
Task Delete(string org, int hookId);
}
}