class Github::Client::Orgs::Hooks

service hooks for an organization.
The Organizations Hooks API manages the post-receive web and

def create(*args)

Other tags:
    Api: - public

Parameters:
  • params (Hash) --

Other tags:
    See: https://developer.github.com/v3/orgs/hooks/#create-a-hook -
def create(*args)
  arguments(args, required: [:org_name]) do
    assert_required REQUIRED_PARAMS
  end
  post_request("/orgs/#{arguments.org_name}/hooks", arguments.params)
end

def delete(*args)

Other tags:
    Api: - public

Other tags:
    See: https://developer.github.com/v3/orgs/hooks/#delete-a-hook -
def delete(*args)
  arguments(args, required: [:org_name, :id])
  delete_request("/orgs/#{arguments.org_name}/hooks/#{arguments.id}",
                 arguments.params)
end

def edit(*args)

Other tags:
    Api: - public

Parameters:
  • params (Hash) --

Other tags:
    See: https://developer.github.com/v3/orgs/hooks/#edit-a-hook -
def edit(*args)
  arguments(args, required: [:org_name, :id]) do
    assert_required REQUIRED_PARAMS
  end
  patch_request("/orgs/#{arguments.org_name}/hooks/#{arguments.id}",
                arguments.params)
end

def get(*args)

Other tags:
    Api: - public

Other tags:
    See: https://developer.github.com/v3/orgs/hooks/#get-single-hook -
def get(*args)
  arguments(args, required: [:org_name, :id])
  get_request("/orgs/#{arguments.org_name}/hooks/#{arguments.id}",
              arguments.params)
end

def list(*args)

Other tags:
    Api: - public

Other tags:
    See: https://developer.github.com/v3/orgs/hooks/#list-hooks -
def list(*args)
  arguments(args, required: [:org_name])
  response = get_request("/orgs/#{arguments.org_name}/hooks", arguments.params)
  return response unless block_given?
  response.each { |el| yield el }
end

def ping(*args)

Other tags:
    Api: - public

Other tags:
    See: https://developer.github.com/v3/orgs/hooks/#ping-a-hook -
def ping(*args)
  arguments(args, required: [:org_name, :id])
  post_request("/orgs/#{arguments.org_name}/hooks/#{arguments.id}/pings",
               arguments.params)
end