问题
I search for repositories according to the documentation.
https://github.com/octokit/octokit.net/blob/master/docs/search.md
How to get at least some data on the repository license?
I mean get data from this page. enter image description here
Or the content of the file - "LICENSE.txt"
I need information from any of the areas indicated in the figure.
I try to do on using the code, but I don’t understand how to do it correctly
var repoLicen = client.Repository.GetLicenseContents("octokit", "octokit.net");
var licen = repoLicen.li???
回答1:
Try this:
var licenseContents = github.Repository.GetLicenseContents("octokit", "octokit.net").Result;
GetLicenseContents returns Task this means that the method is asynchronous. https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/async/
来源:https://stackoverflow.com/questions/52728418/how-to-get-at-least-some-data-on-the-repository-license