norkunas/onesignal-php-api

New API v11

Opened this issue · 5 comments

Hi,

Onesignal released a new API version v11 => https://documentation.onesignal.com/reference

Will you add new methods to support it?

Hey, maybe someday, in the meantime contributions are welcome :)

Ok. I'll take a swing at it when i catch time... :)

I just think that while introducing new api's we can simplify the things without using Symfony OptionsResolver component and instead rely on phpdocs, so if people are using static analysis tools they could find problems before shipping the code.

Something like:

class SubscriptionCreatePayload {
  /**
   * @param 'Email'|'SafariPush'|... $type
   */
  public function __construct(
    private readonly string $type,
    // ..all other props
  }
}

$oneSignal->subscriptions->create($payloadObject)

But this would be a new major and php version constraint will need to be increased

yeah... anyway I'm looking at the refefrence now and they really did a big overhaul... deprecated a lot of stuff

@norkunas I finally managed to do some initial work :)