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

Strongly typed "LINQ to Customer.io" implementation for API broadcasts #7

Open
vegardlarsen opened this issue Mar 12, 2018 · 0 comments

Comments

@vegardlarsen
Copy link
Member

await _customerIo.Campaign(17)
    .Where(broadcast => broadcast.InSegment(23))
    .Where(broadcast => broadcast.Customer.Interest == "roadrunners")
    .TriggerAsync(new { data = "foo" });

This would give us type safety (we already know what all the customer attributes are, but it would require adding a generic type argument to our entire class).

Everything in the API syntax, should be possible to implement using expression trees, but this may turn out to be a lot more work than required.

See:

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

No branches or pull requests

1 participant