List content of git [closed]

1

List the content of link with C # on a console.

For example, the following code shows the followers of a user and the number of repositories of a user, but I need to list the contents of the previous address.

public async Task<String> TestGitHub() {

        var github = new GitHubClient(new ProductHeaderValue("MyAmazingApp"));

        var user = await github.User.Get("half-ogre");

        Console.WriteLine(user.Followers +" folks  love the half ogre!");

        Console.WriteLine("Repositories: \n"+ user.PublicRepos);

        return user.Url;
    } 
    
asked by AaaaLl56 21.04.2017 в 03:53
source

1 answer

0

I understand you use this library

octokit.net

If so, the first thing I would recommend is to analyze the code of the tests to understand how to use the library.

You have a good documentation

Octokit.net Documentation

But to list content you must evaluate the property Repository

var github = new GitHubClient(...); 

var contents = await github
            .Repository
            .Content
            .GetAllContents("octokit", "octokit.net");

Getting all files for repository using OctoKit

    
answered by 21.04.2017 в 08:45