requests.go 619 B

1234567891011121314151617181920
  1. package apiversions
  2. import (
  3. "devel.mephi.ru/iacherepanov/openstack-gophercloud"
  4. "devel.mephi.ru/iacherepanov/openstack-gophercloud/pagination"
  5. )
  6. // List lists all the API versions available to end-users.
  7. func List(c *gophercloud.ServiceClient) pagination.Pager {
  8. return pagination.NewPager(c, listURL(c), func(r pagination.PageResult) pagination.Page {
  9. return APIVersionPage{pagination.SinglePageBase(r)}
  10. })
  11. }
  12. // Get will get a specific API version, specified by major ID.
  13. func Get(client *gophercloud.ServiceClient, v string) (r GetResult) {
  14. _, r.Err = client.Get(getURL(client, v), &r.Body, nil)
  15. return
  16. }