ns1 / ns1-go

Golang API client for NS1
Apache License 2.0
34 stars 59 forks source link

"destinations" field is missing from the Feed struct #239

Closed marcsello closed 1 month ago

marcsello commented 3 months ago

According to the API documentation here: https://developer.ibm.com/apis/catalog/ns1--ibm-ns1-connect-api/api/API--ns1--ibm-ns1-connect-api#getFeed , the feed resource has a "destinations" field. However this field is missing from the client implementation's Feed struct.

I found the implementation for it in the same file above the Feed: https://github.com/ns1/ns1-go/blob/72c28cb2abb537ade303b5ab2be5c3cc38e88632/rest/model/data/feed.go#L3-L23 This struct does not seem to be used anywhere else in the code, so I assume, it was meant to be included but accidentally left out.

Extending the struct like this:

type Feed struct {
  ...
  Destinations []Destination `json:"destinations"`
}

Seems to be working properly for DataFeeds.Get and DataSources.Get.