marcreichel / igdb-laravel

Simplify the integration of the IGDB API into your Laravel app. Including IGDB webhook support.
https://marcreichel.dev/docs/igdb-laravel
MIT License
104 stars 22 forks source link

Feature Request: Add Event Endpoint #79

Closed kaiserkiwi closed 10 months ago

kaiserkiwi commented 10 months ago

It looks like IGDB now has something for Events on their page and I just realized that there is an endpoint that is not available with this package. https://api-docs.igdb.com/#event

I really love the way I can work with this package and would love to get events through it.

Additional Endpoints:

marcreichel commented 10 months ago

@kaiserkiwi Thank you for your kind words. Really appreciate it!

The event endpoints are quite new, yes. That's why they are not available in this package yet. Actually today I have some time to look into it and may implement it. Shouldn't be that hard though.

Stay tuned 😊

kaiserkiwi commented 10 months ago

Nice! Thank you for you immediate feedback!

marcreichel commented 10 months ago

@kaiserkiwi To give you an update: The endpoints are implemented in the linked PR. I just took the opportunity to refactor and optimize the code a bit. For example the Enums are real PHP 8.1 Enums now. Which "sadly" is a breaking change though. I just have to align some small bits (for full Webhook support) and then I will merge the linked PR and tag the changes as version 5.0.

Just a quick question: Will you be able to upgrade to version 5.0 effortlessly? For example some methods like Image::getUrl() require you to use the Enum now whereas before also simple strings where possible. If you already used the "fake" Enums you're good to go without any changes needed 👍🏼

If not I will backport only the event endpoints to version 4.x as well.

kaiserkiwi commented 10 months ago

I think I should be good. My project runs on 8.2 and I use native enums for some parts.

The full Webhook support is music to my ears as I wanted to look into this soon!

If there's anything that breaks I'll look into it and give you feedback. But I don't think anything bad will happen. Probably a good time to write some more test before upgrading. 😁

Thanks for your efforts!

marcreichel commented 10 months ago

@kaiserkiwi I've now released the changes. Actually as version 4.1.0 and not 5.0.0 as previously mentioned. I've added some things to make the changes backwards compatible.

So feel free to update to the latest version. 🙂

I've added a bunch of unit tests, so we should be good I think 😄 #FamousLastWords

Let me know if something is not working as expected though.

kaiserkiwi commented 10 months ago

Wow that was fast! Thank you!

I'll try to test everything this weekend and will let you know if everything works as before. Maybe I find the time to implement the first parts of the event feature in my site, so I can let you know if I found something unexpected.

kaiserkiwi commented 10 months ago

Had no time to test the new endpoints yet. But I can confirm that there are no breaking changes (at least for me). Everythings works as expected.