blob: 1d56cef8631b8a63cebd6a1fd315fe4769891422 [file] [log] [blame]
Brad Ison366a7a02016-03-27 17:06:21 -04001package webhooks
2
3import (
4 "github.com/rackspace/gophercloud"
5 "github.com/rackspace/gophercloud/pagination"
6)
7
8// List returns all webhooks for a scaling policy.
9func List(client *gophercloud.ServiceClient, groupID, policyID string) pagination.Pager {
10 url := listURL(client, groupID, policyID)
11
12 createPageFn := func(r pagination.PageResult) pagination.Page {
13 return WebhookPage{pagination.SinglePageBase(r)}
14 }
15
16 return pagination.NewPager(client, url, createPageFn)
17}