muxinc / mux-php

Official Mux API wrapper for PHP projects, supporting both Mux Data and Mux Video.
MIT License
40 stars 30 forks source link

Webhook usage #32

Closed Babwenbiber closed 3 years ago

Babwenbiber commented 3 years ago

I couldn't find any examples for the web hooks. Is there a way to parse the post request into some mux-php model?

Parsing $request->data["playback_ids"][0]["id"] feels kinda wrong.

Cheers

philcluff commented 3 years ago

Hi @Babwenbiber, thanks for the question.

At the moment this isn't directly possible in the SDKs that we generate from our OpenAPI bindings. While you could parse a part of the webhook payload, there are some edge cases where this won't work correctly, so we don't recommend it right now.

We're aware of this limitation and it's on our list of things to address down the road.

Thanks.