This repository was archived by the owner on Mar 4, 2025. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue: #49
Adds the feeds api methods per https://api.novu.co/api#/Feeds/FeedsController_createFeed
Adds unit tests for new methods
I did not not create an interface for the feeds service as I didn't see the other ones, such as on events.go actually being used anywhere, and I didn't see the need for creating one since the interface doesn't need to be passed anywhere as well. I think leaving it out could help with setting a pattern for future contributors for not writing code that is not implemented.
I did the same thing with the JsonResponse type in models.go. So that it doesn't continue to a pattern of multiple structs that are all the same thing.
i embedded the JsonResponse into the Subscriber and Events response types - so they are the same. I did this instead of deleting them to account for backwards compatibility in case there is anyone using this as a package and upgrade -this way their code doesn't break. For this same reason I didn't delete the unused interfaces in other files.