novuhq / novu-ruby

Ruby SDK for Novu - The open-source notification infrastructure for engineers. 🚀
https://rubygems.org/gems/novu
MIT License
23 stars 10 forks source link

add bulk subscribers creation api #39

Closed Eazybright closed 11 months ago

Eazybright commented 11 months ago

This PR adds the functionality to create multiple subscribers at once. Use Case:

payload = {
    'subscribers' => [
        {
            'name' => 'subscriber-1',
            'email' => 'user1@example.com',
            'firstName' => 'test1',
            'lastName' => 'test1',
            'phone' => '08122442244',
            'subscriberId' => 'subscriber-test-1221'
        },
        {
            'name' => 'subscriber2',
            'email' => 'user2@example.com',
            'firstName' => 'test2',
            'lastName' => 'test2',
            'phone' => '0814422334',
            'subscriberId' => 'subscriber-test-9090'
        }
    ]
}
client.create_bulk_subscribers(payload)
unicodeveloper commented 11 months ago

Please also resolve the merge conflicts @Eazybright

Eazybright commented 11 months ago

Please also resolve the merge conflicts @Eazybright

done

Eazybright commented 11 months ago

@unicodeveloper i want to ask that at what point is the changes pushed to the gem repository?

unicodeveloper commented 11 months ago

It will be pushed next week @Eazybright. I have to push manually.

unicodeveloper commented 11 months ago

On the other hand, if you can figure out how to create a workflow GitHub action that can automatically run to release a new version on rubygem when I tag a new release on GitHub, then that would be fantastic!

E.g if I tag v2.0.0, a github action should run that authenticates with the package on rubygem and publishes a new release. @Eazybright

unicodeveloper commented 11 months ago

The PHP, Kotlin, Java, Python and .NET SDKs automatically publishes when I tag a new release on the GitHub repo.

Eazybright commented 11 months ago

On the other hand, if you can figure out how to create a workflow GitHub action that can automatically run to release a new version on rubygem when I tag a new release on GitHub, then that would be fantastic!

E.g if I tag v2.0.0, a github action should run that authenticates with the package on rubygem and publishes a new release. @Eazybright

alright, i will work on it.

Maybe you can create an issue for it for documentation puerpose.

unicodeveloper commented 11 months ago

I'll do that and will assign to you @Eazybright

unicodeveloper commented 11 months ago

Raised the issue here #42 @Eazybright. Please feel free to comment on the issue and ask for assignment.