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

Missing Count property on Segment #122

Closed
ThomasArdal opened this issue May 18, 2018 · 7 comments
Closed

Missing Count property on Segment #122

ThomasArdal opened this issue May 18, 2018 · 7 comments

Comments

@ThomasArdal
Copy link
Contributor

In the API, Segments have a count attribute. This attribute is never mapped to a property on the Segment object. I've talked with Intercom support, who tell me that it is because count wasn't available in the previous versions of the API.

@kmossco
Copy link
Contributor

kmossco commented May 18, 2018

You're right, this is missing. We are having a few woes with the transition to DotnetStandard but I'll try to squeeze this in asap.

image

However if anyone has the time to send us a PR I'll be happy to review it.

@ThomasArdal
Copy link
Contributor Author

How would you prefer the include_count parameter to be set?

Could be always:

result = Get<Segment>(parameters: new Dictionary<string, string> { { "include_count", "true" } }, resource: SEGMENTS_RESOURCE + Path.DirectorySeparatorChar + id);

Through a parameter on the View-method:

public Segment View(String id, includeCount = false)

Or something third?

@ThomasArdal
Copy link
Contributor Author

@kmossco

@kmossco
Copy link
Contributor

kmossco commented May 24, 2018

@ThomasArdal so sorry for the delay here, completely missed this one. 😞 I think that the second option would make more sense as it's the pattern we already have for other endpoints like Scroll:

public Contacts Scroll(String scrollParam = null)
{
Dictionary<String, String> parameters = new Dictionary<String, String>();
if (!String.IsNullOrWhiteSpace(scrollParam))
{
parameters.Add("scroll_param", scrollParam);
}
ClientResponse<Contacts> result = null;
result = Get<Contacts>(parameters: parameters, resource: CONTACTS_RESOURCE + Path.DirectorySeparatorChar + "scroll");
return result.Result;
}

How does that sound?

@ThomasArdal
Copy link
Contributor Author

No problem 😄

There you go: #126

@kmossco
Copy link
Contributor

kmossco commented May 24, 2018

This is awesome! 🎉 Thank you so much. We are having a few issues with our Nuget package build and so PRs are a bit delayed, but as soon as we fix that I'll review your PR and add it to the next release. 👍

@kmossco
Copy link
Contributor

kmossco commented Aug 9, 2018

Closed with release 2.1.0.

@kmossco kmossco closed this as completed Aug 9, 2018
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

3 participants