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

"feeds" field is missing from the Answer struct #240

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

"feeds" field is missing from the Answer struct #240

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#getRecord , the answer fields of the record resource has a "feeds" field. However this field is missing from the client implementation's Answer struct here:

type Answer struct {
ID string `json:"id,omitempty"`
Meta *data.Meta `json:"meta,omitempty"`
// Answer response data. eg:
// Av4: ["1.1.1.1"]
// Av6: ["2001:db8:85a3::8a2e:370:7334"]
// MX: [10, "2.2.2.2"]
Rdata []string `json:"answer"`
// Region(grouping) that answer belongs to.
RegionName string `json:"region,omitempty"`
}

Extending the struct like this:

type AnswerFeed struct {
  Feed   string `json:"feed"`
  Source string `json:"source"`
}

type Answer struct {
  ...
  Feeds []AnswerFeed `json:"feeds"`
}

Seems to be working properly for Records.Get.

This field would be very useful to have included, because feeds can not be queried only by their ID (that can be get from a metadata feed pointer) the source ID is needed as well, but there's no other way to get this info.

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