1package pagerduty
2
3// ListAbilityResponse is the response when calling the ListAbility API endpoint.
4type ListAbilityResponse struct {
5	Abilities []string `json:"abilities"`
6}
7
8// ListAbilities lists all abilities on your account.
9func (c *Client) ListAbilities() (*ListAbilityResponse, error) {
10	resp, err := c.get("/abilities")
11	if err != nil {
12		return nil, err
13	}
14	var result ListAbilityResponse
15	return &result, c.decodeJSON(resp, &result)
16}
17
18// TestAbility Check if your account has the given ability.
19func (c *Client) TestAbility(ability string) error {
20	_, err := c.get("/abilities/" + ability)
21	return err
22}
23