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

[SDK-870] Feature/remove tuples #257

Merged
merged 2 commits into from
Apr 16, 2024
Merged

Conversation

HarrisonHough
Copy link
Collaborator

@HarrisonHough HarrisonHough commented Apr 11, 2024

SDK-870

Description

  • Removed used of tuples for responses in favor of defined structs
  • marked old functions as Obselete

How to Test

  • Add steps to locally test these changes

Checklist

  • Tests written or updated for the changes.
  • Documentation is updated.
  • Changelog is updated.

@HarrisonHough HarrisonHough requested a review from a team as a code owner April 11, 2024 09:18
@HarrisonHough HarrisonHough changed the title Feature/remove tuples [SDK-870] Feature/remove tuples Apr 11, 2024
Copy link
Contributor

@rk132 rk132 left a comment

Choose a reason for hiding this comment

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

a few small suggestions, to maybe clean up the deprecated methods, so less code duplication and more clearer, why it was deprecated in the future.

/// <returns>Avatar gameObject</returns>
/// <param name="bodyType">Avatar body type</param>
/// <returns>A tuple in the form of (GameObject, AvatarProperties)</returns>
[Obsolete("This method is deprecated. Use CreateAvatarFromTemplateAsync instead.")]
public async Task<(GameObject, AvatarProperties)> CreateAvatarFromTemplate(string id, BodyType bodyType)
{
GameObject avatar = null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
GameObject avatar = null;
var data = await CreateAvatarFromTemplateAsync(id, bodyType);
return (data.AvatarObject, data.Properties);

/// </summary>
/// <param name="avatarProperties">Properties which describes avatar</param>
/// <returns>A tuple in the form of (GameObject, AvatarProperties)</returns>
[Obsolete("This method is deprecated. Use CreateAvatarAsync instead.")]
public async Task<(GameObject avatarGameObject, AvatarProperties avatarProperties)> CreateAvatar(AvatarProperties avatarProperties)
{
GameObject avatar = null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
GameObject avatar = null;
var createdAvatar = await CreateAvatarAsync(avatarProperties);
return (createdAvatar.AvatarObject, createdAvatar.Properties);

@HarrisonHough HarrisonHough merged commit 6565464 into develop Apr 16, 2024
9 of 10 checks passed
@HarrisonHough HarrisonHough deleted the feature/remove-tuples branch April 16, 2024 10:07
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

Successfully merging this pull request may close these issues.

2 participants