Skip to content
New issue

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

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

Already on GitHub? # to your account

Add Campaign Endpoints to API #40

Merged
merged 14 commits into from
Aug 7, 2020
Merged

Add Campaign Endpoints to API #40

merged 14 commits into from
Aug 7, 2020

Conversation

willselby
Copy link
Contributor

@willselby willselby commented Jul 10, 2020

Story

https://www.notion.so/Ability-to-create-campaigns-via-the-API-2ca60ecd7c8448d7bca29e0fdab65758

Description

Enable interaction with campaigns via API.

@JonoB JonoB requested review from mauricius and dljfield July 10, 2020 14:14
Copy link
Contributor

@dljfield dljfield left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we actually need to consider a bit more about what we want the API to be able to do around campaigns. The normal CRUD parts that we implement in other endpoints and that we have here is only part of the story with them, allowing us to use the API to get to the point of what we consider Draft status, but not going any further.

So we need to consider whether we want the API to be able to dispatch campaigns or not, and if they are dispatched, what stats we want to actually expose. Right now the GET endpoints expose some data but not all of the stats that we expose in the UI, I think, and some of that is maybe irrelevant to Draft campaigns.

My own view is that the create/update endpoints need to handle every field except scheduled_at, and then have a separate endpoint to dispatch. Additionally, we should either include stats in the index/show views or include none of the things like sent/open/click counts and instead have a separate stats endpoint for a campaign.

@JonoB
Copy link
Contributor

JonoB commented Jul 10, 2020

Yeah, I was thinking about this as well.

As it currently stands, just setting the campaign status to 2 will result in it being dispatched (as long as a the scheduled_at is in the past).

@JonoB JonoB merged commit c7cc5bb into master Aug 7, 2020
@JonoB JonoB deleted the api-campaigns branch August 7, 2020 11:40
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants