diff --git a/priorites.go b/priorites.go index 845738ce..78a75de1 100644 --- a/priorites.go +++ b/priorites.go @@ -6,20 +6,25 @@ import ( "github.com/google/go-querystring/query" ) -// PriorityProperty is a single priorty object returned from the Priorities endpoint -type PriorityProperty struct { - APIObject - Name string `json:"name"` - Description string `json:"description"` -} +// PriorityProperty is the original type name and is retained as an alias for API +// compatibility. +// +// Deprecated: Use type Priority instead; will be removed in V2 +type PriorityProperty = Priority // ListPrioritiesResponse repreents the API response from PagerDuty when listing // the configured priorities. type ListPrioritiesResponse struct { APIListObject - Priorities []PriorityProperty `json:"priorities"` + Priorities []Priority `json:"priorities"` } +// Priorities is the original type name and is retained as an alias for API +// compatibility. +// +// Deprecated: Use type ListPrioritiesResponse instead; will be removed in V2 +type Priorities = ListPrioritiesResponse + // ListPrioritiesOptions is the data structure used when calling the // ListPriorities API endpoint. type ListPrioritiesOptions struct { diff --git a/priorities_test.go b/priorities_test.go index 5ba01467..7be1d7c4 100644 --- a/priorities_test.go +++ b/priorities_test.go @@ -23,7 +23,7 @@ func TestPriorities_List(t *testing.T) { want := &ListPrioritiesResponse{ APIListObject: listObj, - Priorities: []PriorityProperty{ + Priorities: []Priority{ { APIObject: APIObject{ ID: "1",