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

Feat/conversation contact #33

Merged
merged 18 commits into from
Jan 25, 2024
Merged

Feat/conversation contact #33

merged 18 commits into from
Jan 25, 2024

Conversation

Dovchik
Copy link
Contributor

@Dovchik Dovchik commented Jan 17, 2024

Add support for contacts api endpoints

await _http.Send<ListContactsResponse>(uri, HttpMethod.Get, cancellationToken);
request.PageToken = response.NextPageToken;
foreach (var contact in response.Contacts) yield return contact;
} while (request.PageToken is not null);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note to self

Suggested change
} while (request.PageToken is not null);
} while (!string.IsNullOrEmpty(request.PageToken));

private string _email;
private string _externalId;
private string _id;
private string _language;

Choose a reason for hiding this comment

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

From specs it is a dedicated schema and a (long) list of predefined values.
Ideally we should provide enums as helper ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, makes sense.
Side comment: did you enjoy working with enums of 20+ values?

Choose a reason for hiding this comment

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

No 😞
But from SDK user point of view and because not related to any ISO definition, we can just assuming providing list of supported values will be helpful

/// <returns></returns>
internal string GetPropertiesMask()
{
return string.Join(',', _setFields.Select(StringUtils.ToSnakeCase));
Copy link

@JPPortier JPPortier Jan 25, 2024

Choose a reason for hiding this comment

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

Ideally this logic could be dynamic and dependent of OAS description based onto style and explode specs.
This, to avoid hard coded logic here and logic/helper shared across domains

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, why to avoid makes sense but how, you mean add helpers for that?
I had an idea for that but in a other task where i see the pattern

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, okay, I'll refactor in other task

@Dovchik Dovchik merged commit 101b1ba into main Jan 25, 2024
3 checks passed
@Dovchik Dovchik deleted the feat/conversation-contact branch January 25, 2024 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants