Click here to Skip to main content
15,916,463 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I tried SharpBucket api from my website to access my bitbucket account and access the repository. Will you please provide help on how to

1.Access the repository folder and its commited files through code.
2.Commit a file trough code.

Please see the sample code i tried
C#
 private static void TestRestRepositoriesEndPoint(SharpBucketV2 sharpBucket){
            var repositoriesEndPoint = sharpBucket.RepositoriesEndPoint();
            var repositories = repositoriesEndPoint.ListRepositories(accountName);
            //var publicRepositories = repositoriesEndPoint.ListPublicRepositories();
            var repositoryResource = repositoriesEndPoint.RepositoryResource(accountName, repository);
            var watchers = repositoryResource.ListWatchers();
            var forks = repositoryResource.ListForks();
            var com = repositoryResource.ListCommits();//Iam getting an error here(An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in mscorlib.dll)
}


Thanks,
Amrutha.

What I have tried:

I Downloaded a sample code from the git . The portion where i got error is mentioned above.
Posted
Updated 18-Jul-16 20:59pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900