Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New API v11 #172

Open
rcerljenko opened this issue Aug 17, 2023 · 5 comments
Open

New API v11 #172

rcerljenko opened this issue Aug 17, 2023 · 5 comments

Comments

@rcerljenko
Copy link
Contributor

Hi,

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

Will you add new methods to support it?

@norkunas
Copy link
Owner

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

@rcerljenko
Copy link
Contributor Author

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

@norkunas
Copy link
Owner

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

@rcerljenko
Copy link
Contributor Author

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

@rcerljenko
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants