Skip to content

Conversation

@DiegoG1019
Copy link

Resolves #3038


Before the change?

Currently, to download a Release Asset, one would need to delve into ApiConnection and Connection objects, get a byte[] array and manually set the Accept header

It's bulky, and not much documentation is available for this

After the change?

Two new easily discoverable methods are present in ReleaseClient: Task<Stream> DownloadAsset(long, long) and Task<Stream> DownloadAsset(string, string, long)
Even if no documentation is available, any good enough IDE can allow a programmer to discover the two methods and use them

I reviewed the tests but was unable to find a relevant test to modify -- The download uses the same string building techniques the rest of the API uses and that the tests try for
I did test it on my own machine, but didn't want to pollute the Tests set with file download tests when none are present (that I could find) even for obtaining response results

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

No breaking changes, lengths were taken to exclusively add and not modify nor remove

  • Yes
  • No

I'd like to additionally include that I didn't deem it necessary to update the documentation, but if there's anything that I missed, misunderstood, or that is pending for me to include, I would greatly appreciate being told, and I'll gladly do it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🆕 Triage

Development

Successfully merging this pull request may close these issues.

[FEAT]: DownloadAsset method

1 participant