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

Design flaw in SailthruClient GetStat method definition #25

Open
hickeroar opened this issue Oct 3, 2016 · 0 comments
Open

Design flaw in SailthruClient GetStat method definition #25

hickeroar opened this issue Oct 3, 2016 · 0 comments

Comments

@hickeroar
Copy link

hickeroar commented Oct 3, 2016

https://github.com/sailthru/sailthru-net-client/blob/master/Sailthru/Sailthru/SailthruClient.cs#L528

This GetStat method is overloaded:

public SailthruResponse GetStat(String stat, String list = null, String date = null, Hashtable htOptions = null)

public SailthruResponse GetStat(String stat, String template = null, String startDate = null, String endDate = null, Hashtable htOptions = null)

Every parameter after the first one is optional, but they're actually required if you want to call the method successfully. If you try calling GetStat("list") it's flagged as ambiguous because it doesn't know which to call. If you only want the first parameter to be specified, you instead have to call GetStat("list", null, null, new HashTable()).

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

1 participant