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

🌿 Fern Regeneration -- August 26, 2024 #47

Merged
merged 2 commits into from
Aug 26, 2024

Conversation

fern-api[bot]
Copy link
Contributor

@fern-api fern-api bot commented Aug 26, 2024

This PR regenerates code to match the latest API Definition.

@fern-api fern-api bot requested a review from fern-bot August 26, 2024 19:04
var response = await _client.MakeRequestAsync(
new RawClient.JsonApiRequest
{
BaseUrl = _client.Options.BaseUrl,
Method = HttpMethod.Get,
Path = $"v2/transcript/{transcriptId}/{formatSlug}",
Path = $"v2/transcript/{transcriptId}/{subtitleFormat}",
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be subtitleFormat.Stringify().

/// </summary>
public UserAgent UserAgent { get; set; } = new();
public HttpClient HttpClient { get; init; } = new HttpClient();

/// <summary>
/// The http client used to make requests.
Copy link
Contributor

Choose a reason for hiding this comment

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

This doc comment is incorrect.

}
Options = options,
},
cancellationToken
);
var responseBody = await response.Raw.Content.ReadAsStringAsync();
Copy link
Contributor

Choose a reason for hiding this comment

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

cancellationToken should be passed to response.Raw.Content.ReadAsStringAsync too

Copy link
Contributor

Choose a reason for hiding this comment

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

Anything that's async usually

Copy link
Contributor

Choose a reason for hiding this comment

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

Also .ConfigureAwait(false)

Copy link
Contributor

Choose a reason for hiding this comment

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

You'll need to use conditional compilation tho:

#if NET6_0_OR_GREATER
        var responseBody = await response.Raw.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
#else
        var responseBody = await response.Raw.Content.ReadAsStringAsync().ConfigureAwait(false);
#endif

@Swimburger Swimburger merged commit d6c4669 into main Aug 26, 2024
2 of 3 checks passed
@Swimburger Swimburger deleted the fern-bot/08-26-2024-0704PM branch August 26, 2024 20:43
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.

1 participant