Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
marcsello opened this issue Jul 31, 2024 · 0 comments · Fixed by #243
Closed

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

marcsello opened this issue Jul 31, 2024 · 0 comments · Fixed by #243
Assignees

Comments

@marcsello
Copy link
Contributor

marcsello commented Jul 31, 2024

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:

// Destination is the target resource the receives data from a feed/source.
type Destination struct {
ID string `json:"destid"`
// All destinations must point to a record.
RecordID string `json:"record"`
// Type is the 'level' at which to apply the filters(on the targeted record).
// Options:
// - answer (highest precedence)
// - region
// - record (lowest precendence)
Type string `json:"desttype"`
SourceID string `json:"-"`
}
// NewDestination returns an empty feed destination.
func NewDestination() *Destination {
return &Destination{}
}

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants