-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
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.
var payload struct {
Type string `json:"type"`
Data muxgo.LiveStream `json:"data"`
}
if err := 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.
BradenBagby, RobinLbt and moabe94
Metadata
Metadata
Assignees
Labels
No labels