You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not a huge deal but it would be nice if this package included typed models for easier webhook processing.
For example, I'd like to process the payload data in a video.live_stream.created webhook event however there are incompatible differences with the near-identical muxgo.LiveStream struct.
varpayloadstruct {
Typestring`json:"type"`Data muxgo.LiveStream`json:"data"`
}
iferr:=resty.Unmarshalc(resty.New(), "application/json", body, &payload); err!=nil {
panic("json: cannot unmarshal number into Go struct field LiveStream.data.created_at of type string")
}
In this particular case, the webhook uses integer dates whereas the API model uses RFC3339 dates.
The text was updated successfully, but these errors were encountered:
Hey @NathanBaulch, thanks for the feedback here, really appreciate it. We're aware of this issue and that it limits the usability of the SDK for receiving webhooks.
I don't have a timeline on addressing this as resolving it would require a breaking change to our API, or a lot of code duplication, but we are aware of this and working towards a solution.
Not a huge deal but it would be nice if this package included typed models for easier webhook processing.
For example, I'd like to process the payload data in a
video.live_stream.created
webhook event however there are incompatible differences with the near-identicalmuxgo.LiveStream
struct.In this particular case, the webhook uses integer dates whereas the API model uses RFC3339 dates.
The text was updated successfully, but these errors were encountered: