OneSignal / onesignal-php-api

The official OneSignal API client for PHP
Other
19 stars 10 forks source link

[question]: Why yet creating another library? #13

Closed norkunas closed 1 year ago

norkunas commented 1 year ago

How can we help?

I've maintaining https://github.com/norkunas/onesignal-php-api since 2015 which is modern, has tests and more than 1m downloads. I'd be gladly transfered it under OneSignal ownership, but yet here we are, with a library that does not use at least PSR HttpClient and ties the consumers to the guzzle library instead of giving them choice to use any. :slightly_smiling_face:

Code of Conduct

kesheshyan commented 1 year ago

Hey @norkunas! Thanks for your contribution, we really appreciate your effort in this direction! At the moment our approach for building these server API libraries is to generate them from the OpenAPI schema using our private fork of OpenAPI generator. As you can see here, currently we have 9 libraries all generated from the same source. It worth mentioning that we constantly update the schema with new endpoints, fixes, documentation etc. It's just not feasible for us to maintain so many code sources separately. We understand that provided implementation may not be the best for all the languages, but that's what OpenAPI generator provides. At least we can guarantee that it stays up to date with the OneSignal official API in most cases. Honestly I don't know what to suggest here. Your library seems to be more user friendly and idiomatic then the one we provide, but it's not covering all the functions and methods we have in our API. We would appreciate if you add a link to the official OneSignal PHP library in your repo. Thanks again, and sorry for this confusion!

norkunas commented 1 year ago

Maybe you could try to use https://github.com/janephp/janephp which is supports PSR18 :) Also I didn't see anywhere in OneSignal documentation page a reference to the openapi so didn't have a way to be always up to date with your api, so needed to check the docs and rely on them which I see now that docs are missing many endpoints that are in this library.