### Creating a New Repository - C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Readme.md Provides an example of how to create a new repository resource object with basic details (name, language, scm) and then use the PostRepository method on the repository resource to create the repository on Bitbucket. ```CSharp var newRepository = new Repository { name = "Sample", language = "c#", scm = "git" }; var newRepositoryResult = repositoryResource.PostRepository(newRepository); ``` -------------------------------- ### Get Branching Model - BranchingModelResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API GET endpoint for retrieving the repository's branching model: /repositories/{workspace}/{repo_slug}/branching-model. This method is tested. ```C# BranchingModelResource.GetBranchingModel() ``` -------------------------------- ### Getting Repository Source (Constructor) using SharpBucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md This snippet represents the implementation for retrieving repository source content via the GET /repositories/{workspace}/{repo_slug}/src endpoint when the revision parameter is not specified. It is implemented by the SrcResource constructor in C#. This functionality is tested. ```C# SrcResource.ctor ``` -------------------------------- ### List Commits by Revision with Parameters - RepositoryResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API GET endpoint for listing commits starting from a specific revision with specific parameters: /repositories/{workspace}/{repo_slug}/commits/{revision}. This method is currently not tested. ```C# RepositoryResource.ListCommits(string,CommitsParameters) ``` -------------------------------- ### Get Branching Model Settings - BranchingModelResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API GET endpoint for retrieving the repository's branching model settings: /repositories/{workspace}/{repo_slug}/branching-model/settings. This method is tested. ```C# BranchingModelResource.GetSettings() ``` -------------------------------- ### Accessing Repository Endpoint and Commits - C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Readme.md Illustrates how to get the Repositories endpoint and then obtain a specific Repository resource using the account name and repository slug/name. It then shows how to list all commits for that repository. ```CSharp // getting the repositories end point var repositoriesEndPoint = sharpBucket.RepositoriesEndPoint(); // getting the Repository resource for a specific repository var repositoryResource = repositoriesEndPoint.RepositoryResource("accountName", "repoSlugOrName"); // getting the list of all the commits of the repository var commits = repositoryResource.ListCommits(); ``` -------------------------------- ### List Commits by Revision - RepositoryResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API GET endpoint for listing commits starting from a specific revision: /repositories/{workspace}/{repo_slug}/commits/{revision}. This method is currently not tested. ```C# RepositoryResource.ListCommits(string) ``` -------------------------------- ### Get Build Status Info - RepositoryResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API GET endpoint for retrieving a specific build status by key for a commit by node: /repositories/{workspace}/{repo_slug}/commit/{node}/statuses/build/{key}. This method is tested. ```C# RepositoryResource.GetBuildStatusInfo(string,string) ``` -------------------------------- ### Getting a Source Directory using SharpBucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md This snippet represents the implementation for retrieving a specific source directory content via the GET /repositories/{workspace}/{repo_slug}/src/{node}/{path} endpoint. It is implemented by the SrcResource.GetSrcDirectory method in C#. This functionality is tested. ```C# SrcResource.GetSrcDirectory(string) ``` -------------------------------- ### Getting a Source File using SharpBucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md This snippet represents the implementation for retrieving a specific source file content via the GET /repositories/{workspace}/{repo_slug}/src/{node}/{path} endpoint. It is implemented by the SrcResource.GetSrcFile method in C#. This functionality is tested. ```C# SrcResource.GetSrcFile(string) ``` -------------------------------- ### Performing OAuth 1.0 Three-Legged Authentication Flow (C#) Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Readme.md This code illustrates the interactive flow for OAuth 1.0 three-legged authentication using the 'oob' (out-of-band) callback. It guides the user to authorize the application via a URL, prompts for the returned pin, and then uses the pin to obtain the final access tokens. ```CSharp var authenticator = sharpBucket.OAuth1ThreeLeggedAuthentication(consumerKey, consumerSecretKey, "oob"); var uri = authenticator.StartAuthentication(); Process.Start(uri); var pin = Console.ReadLine(); // we can now do the final step by using the pin to get our access tokens authenticator.AuthenticateWithPin(pin); ``` -------------------------------- ### Listing Source Entries using SharpBucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md This snippet represents the implementation for listing source entries within a repository path via the GET /repositories/{workspace}/{repo_slug}/src/{node}/{path} endpoint. It is implemented by the SrcResource.ListSrcEntries method in C#. This functionality is tested. ```C# SrcResource.ListSrcEntries(string,ListParameters) ``` -------------------------------- ### List Commits by Revision with Max - RepositoryResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API GET endpoint for listing commits starting from a specific revision with a maximum limit: /repositories/{workspace}/{repo_slug}/commits/{revision}. This method is currently not tested. ```C# RepositoryResource.ListCommits(string,int) ``` -------------------------------- ### Get Tag Bitbucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Retrieves a specific tag using the GET method on the Bitbucket API endpoint /repositories/{workspace}/{repo_slug}/refs/tags/{name}. This functionality is implemented by the SharpBucket library. ```C# TagsResource.GetTag(string) *V0.17.0* ``` -------------------------------- ### Listing Workspaces using SharpBucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md This snippet represents the implementation for listing the workspaces accessible to the authenticated user via the GET /workspaces endpoint. It is implemented by the WorkspacesEndpoint.ListWorkspaces method in C#. This functionality is tested. ```C# WorkspacesEndpoint.ListWorkspaces() ``` -------------------------------- ### Getting Source File Content using SharpBucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md This snippet represents the implementation for retrieving the raw content of a source file via the GET /repositories/{workspace}/{repo_slug}/src/{node}/{path} endpoint. It is implemented by the SrcResource.GetFileContent method in C#. This functionality is tested. ```C# SrcResource.GetFileContent(string) ``` -------------------------------- ### Get Commit - RepositoryResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API GET endpoint for retrieving a specific commit by node: /repositories/{workspace}/{repo_slug}/commit/{node}. This method is currently not tested. ```C# RepositoryResource.GetCommit(string) ``` -------------------------------- ### Getting a Specific Source Entry using SharpBucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md This snippet represents the implementation for retrieving a specific source entry (file or directory) within a repository path via the GET /repositories/{workspace}/{repo_slug}/src/{node}/{path} endpoint. It is implemented by the SrcResource.GetSrcEntry method in C#. This functionality is tested. ```C# SrcResource.GetSrcEntry(string) ``` -------------------------------- ### Getting the Current User using SharpBucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md This snippet represents the implementation for retrieving information about the current authenticated user via the GET /user endpoint. It is implemented by the UserEndpoint.GetUser method in C#. This functionality is tested. ```C# UserEndpoint.GetUser() ``` -------------------------------- ### Listing Tree Entries using SharpBucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md This snippet represents the implementation for listing tree entries (files and directories) within a repository path via the GET /repositories/{workspace}/{repo_slug}/src/{node}/{path} endpoint. It is implemented by the SrcResource.ListTreeEntries method in C#. This functionality is tested. ```C# SrcResource.ListTreeEntries(string,ListParameters) ``` -------------------------------- ### Accessing User Endpoint and Data - C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Readme.md Shows how to get the Users endpoint for a specific account (user or team) and query various user-related information such as profile, user details, followers, following, and repositories. ```CSharp // getting the users end point (accountName can be the name of a user or a team) var userEndPoint = sharpBucket.UsersEndPoint("accountName"); // querying the Bitbucket API for various info var userProfile = userEndPoint.GetProfile(); var user = userEndPoint.GetUser(); var followers = user.ListFollowers(); var follows = user.ListFollowing(); var userRepos = user.ListRepositories(); ``` -------------------------------- ### List Commits with Parameters - RepositoryResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API GET endpoint for listing commits with specific parameters: /repositories/{workspace}/{repo_slug}/commits. This method is tested. ```C# RepositoryResource.ListCommits(CommitsParameters) ``` -------------------------------- ### Get Branch Restriction - RepositoryResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API GET endpoint for retrieving a specific branch restriction by ID: /repositories/{workspace}/{repo_slug}/branch-restrictions/{id}. This method is currently not tested. ```C# RepositoryResource.GetBranchRestriction(int) ``` -------------------------------- ### Getting a User Profile using SharpBucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md This snippet represents the implementation for retrieving the profile information of a specific user via the GET /users/{username} endpoint. It is implemented by the UsersEndpoint.GetProfile method in C#. This functionality is tested. ```C# UsersEndpoint.GetProfile() ``` -------------------------------- ### List Commits - RepositoryResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API GET endpoint for listing commits: /repositories/{workspace}/{repo_slug}/commits. This method is tested. ```C# RepositoryResource.ListCommits() ``` -------------------------------- ### Get Pull Request Bitbucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Retrieves a specific pull request using the GET method on the Bitbucket API endpoint /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}. This functionality is implemented by the SharpBucket library. ```C# PullRequestResource.GetPullRequest() ``` -------------------------------- ### Getting a Specific Tree Entry using SharpBucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md This snippet represents the implementation for retrieving a specific tree entry (file or directory) within a repository path via the GET /repositories/{workspace}/{repo_slug}/src/{node}/{path} endpoint. It is implemented by the SrcResource.GetTreeEntry method in C#. This functionality is tested. ```C# SrcResource.GetTreeEntry(string) ``` -------------------------------- ### Get Pull Request Activity Log (v0.13.0) - Sharpbucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Retrieves the activity log for pull requests using an older version (v0.13.0 or earlier) of the Sharpbucket library. This method corresponds to the GET /repositories/{workspace}/{repo_slug}/pullrequests/activity endpoint. ```C# PullRequestsResource.GetPullRequestLog() ``` -------------------------------- ### List Commits with Max - RepositoryResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API GET endpoint for listing commits with a maximum limit: /repositories/{workspace}/{repo_slug}/commits. This method is tested. ```C# RepositoryResource.ListCommits(max:int) ``` -------------------------------- ### Get Commit Comment - RepositoryResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API GET endpoint for retrieving a specific comment by ID on a commit by node: /repositories/{workspace}/{repo_slug}/commit/{node}/comments/{comment_id}. This method is tested. ```C# RepositoryResource.GetCommitComment(string,int) ``` -------------------------------- ### Get Pull Request Activities (v0.14.0) - Sharpbucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Retrieves activities for pull requests using a newer version (v0.14.0) of the Sharpbucket library. This method corresponds to the GET /repositories/{workspace}/{repo_slug}/pullrequests/activity endpoint and likely takes a parameter for pagination or filtering. ```C# PullRequestsResource.GetPullRequestsActivities(int) ``` -------------------------------- ### Listing User Repositories using SharpBucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md This snippet represents the implementation for listing the repositories owned by a specific user via the GET /users/{username}/repositories endpoint. It is implemented by the UsersEndpoint.ListRepositories method in C#. This functionality is tested. ```C# UsersEndpoint.ListRepositories(int) ``` -------------------------------- ### Get Pull Request Activity Bitbucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Retrieves the activity feed for a specific pull request using the GET method on the Bitbucket API endpoint /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/activity. This functionality is implemented by the SharpBucket library. ```C# PullRequestResource.GetPullRequestActivity() ``` -------------------------------- ### Get Pull Request Diff Bitbucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Retrieves the diff for a specific pull request using the GET method on the Bitbucket API endpoint /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diff. This functionality is implemented by the SharpBucket library. ```C# PullRequestResource.GetDiffForPullRequest() ``` -------------------------------- ### Get Commit Comment - CommitResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API GET endpoint for retrieving a specific comment by ID on a commit by node: /repositories/{workspace}/{repo_slug}/commit/{node}/comments/{comment_id}. This method is tested. ```C# CommitResource(string).CommentsResource.GetComment(int) ``` -------------------------------- ### List Branches Bitbucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Retrieves a list of branches using the GET method on the Bitbucket API endpoint /repositories/{workspace}/{repo_slug}/refs/branches. This functionality is implemented by the SharpBucket library. ```C# BranchResource.ListBranches() ``` -------------------------------- ### List Tags Bitbucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Retrieves a list of tags using the GET method on the Bitbucket API endpoint /repositories/{workspace}/{repo_slug}/refs/tags. This functionality is implemented by the SharpBucket library. ```C# TagsResource.ListTags() *V0.14.0* ``` -------------------------------- ### Listing Repository Watchers using SharpBucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md This snippet represents the implementation for listing watchers of a repository via the GET /repositories/{workspace}/{repo_slug}/watchers endpoint. It is implemented by the RepositoryResource.ListWatchers method in C#. This functionality is tested. ```C# RepositoryResource.ListWatchers() ``` -------------------------------- ### List Branch Restrictions - RepositoryResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API GET endpoint for listing branch restrictions: /repositories/{workspace}/{repo_slug}/branch-restrictions. This method is currently not tested. ```C# RepositoryResource.ListBranchRestrictions() ``` -------------------------------- ### Get Pull Request Comment Bitbucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Retrieves a specific comment on a pull request using the GET method on the Bitbucket API endpoint /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}. This functionality is implemented by the SharpBucket library. ```C# PullRequestResource.GetPullRequestComment(int) PullRequestResource.CommentsResource.GetComment(int) *v0.14.0* ``` -------------------------------- ### List Pull Requests - Sharpbucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Retrieves a list of pull requests for a repository using the Sharpbucket library. This method corresponds to the GET /repositories/{workspace}/{repo_slug}/pullrequests endpoint. ```C# PullRequestsResource.ListPullRequests(int) ``` -------------------------------- ### Listing Users Followed by a User using SharpBucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md This snippet represents the implementation for listing the users that a specific user is following via the GET /users/{username}/following endpoint. It is implemented by the UsersEndpoint.ListFollowing method in C#. This functionality is tested. ```C# UsersEndpoint.ListFollowing(int) ``` -------------------------------- ### Listing User Followers using SharpBucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md This snippet represents the implementation for listing the followers of a specific user via the GET /users/{username}/followers endpoint. It is implemented by the UsersEndpoint.ListFollowers method in C#. This functionality is tested. ```C# UsersEndpoint.ListFollowers(int) ``` -------------------------------- ### List Commit Comments - RepositoryResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API GET endpoint for listing comments on a specific commit by node: /repositories/{workspace}/{repo_slug}/commit/{node}/comments. This method is tested. ```C# RepositoryResource.ListCommitComments(string) ``` -------------------------------- ### List Commit Comments - CommitResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API GET endpoint for listing comments on a specific commit by node: /repositories/{workspace}/{repo_slug}/commit/{node}/comments. This method is tested. ```C# CommitResource(string).CommentsResource.ListComments() ``` -------------------------------- ### List Pull Request Comments Bitbucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Retrieves comments for a specific pull request using the GET method on the Bitbucket API endpoint /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments. This functionality is implemented by the SharpBucket library. ```C# PullRequestResource.ListPullRequestComments() PullRequestResource.CommentsResource.ListComments() *v0.14.0* ``` -------------------------------- ### List Pull Request Commits Bitbucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Retrieves the commits associated with a specific pull request using the GET method on the Bitbucket API endpoint /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/commits. This functionality is implemented by the SharpBucket library. ```C# PullRequestResource.ListPullRequestCommits() ``` -------------------------------- ### Initializing SharpBucket Client (OAuth2) - C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Readme.md Demonstrates how to create an instance of the SharpBucketV2 client and authenticate using OAuth2 client credentials (consumer key and secret). This is the entry point for interacting with the Bitbucket API. ```CSharp // your main entry to the Bitbucket API, this one is for V2 var sharpBucket = new SharpBucketV2(); // authenticate with OAuth2 keys sharpBucket.OAuth2ClientCredentials(consumerKey, consumerSecretKey); ``` -------------------------------- ### Listing Repositories for a Workspace with Parameters via SharpBucket API v2 (C#) Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md This method retrieves a list of repositories for a workspace, allowing additional filtering or pagination via a ListParameters object. It requires the workspace identifier and a ListParameters object. This method is tested. ```C# RepositoriesEndPoint.ListRepositories(string,ListParameters) ``` -------------------------------- ### Basic Authentication with Username/Password - C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Readme.md Shows how to authenticate with the SharpBucket client using basic authentication by providing a Bitbucket username (email) and password. ```CSharp // authenticate with Bitbucket username and password sharpBucket.BasicAuthentication(email, password); ``` -------------------------------- ### Handling Pagination and Filtering - C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Readme.md Explains how SharpBucket handles pagination internally by default. It shows how to limit the number of results using the Max parameter and how to use the ListParameters object for advanced filtering and sorting on list methods, referencing the Bitbucket API documentation for syntax. It also shows helper methods for building filters. ```CSharp // you can give us a maximum number of results to fetch on all list method var followers = user.ListRepositories(50); // And on some advanced list methods you can provide a ListParameters object // that allow to inject filter and sort parameters // see Atlassian documentation for the filter and sort syntax: // https://developer.atlassian.com/bitbucket/api/2/reference/meta/filtering var listParameters = new ListParameters { Filter = "name ~ \"erik/\"", Sort = "-name", Max = 50 }; var erikBranchesDesc = repositoryResource.BranchesResource.ListBranches(listParameters); // we also provide few helpers to build your filters in FilterBuilder class: FilterBuilder.ParseSingleQuotedString("name ~ 'erik/'"); // return "name ~ \"erik/\"" FilterBuilder.FormatDateTime(DateTime.UtcNow); // return something like "2000-12-31T23:59:59.999z" ``` -------------------------------- ### Creating or Updating a Repository via SharpBucket API v2 (C#) Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md This method is used to create or update a repository using the Bitbucket API v2. It takes a Repository object containing the details to be posted. This method is tested. ```C# RepositoryResource.PostRepository(Repository) ``` -------------------------------- ### Initializing OAuth 1.0 Three-Legged Authentication in SharpBucket (C#) Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md This method initializes the first step of OAuth 1.0 Three-Legged Authentication, typically used to obtain a request token. It requires the consumer key and secret, and optionally accepts a callback URL. This method is not tested. ```C# SharpBucket.OAuth1ThreeLeggedAuthentication(string consumerKey, string consumerSecretKey, string callback = "oob") ``` -------------------------------- ### Authenticating with OAuth 1.0 Two-Legged (C#) Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Readme.md This snippet demonstrates how to perform OAuth 1.0 two-legged authentication using the SharpBucket library. It requires providing your consumer key and secret key, similar to basic authentication. ```CSharp // authenticate with OAuth keys sharpBucket.OAuth1TwoLeggedAuthentication(consumerKey, consumerSecretKey); ``` -------------------------------- ### Listing Repositories for a Workspace via SharpBucket API v2 (C#) Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md This method retrieves a list of repositories belonging to a specific workspace using the Bitbucket API v2. It requires the workspace identifier as a string parameter. This method is tested. ```C# RepositoriesEndPoint.ListRepositories(string) ``` -------------------------------- ### Create Branch Bitbucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Creates a new branch using the POST method on the Bitbucket API endpoint /repositories/{workspace}/{repo_slug}/refs/branches. This functionality is implemented by the SharpBucket library. ```C# BranchResource.PostBranch(Branch) ``` -------------------------------- ### Authenticating with Existing OAuth 1.0 Three-Legged Tokens (C#) Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Readme.md Use this snippet to initialize the OAuth 1.0 three-legged authenticator directly if you already possess valid OAuth tokens and secrets. This allows you to bypass the interactive authorization flow. ```CSharp var authenticator = sharpBucket.OAuth1ThreeLeggedAuthentication(consumerKey, consumerSecretKey, oauthToken, oauthTokenSecret); ``` -------------------------------- ### Listing Public Repositories via SharpBucket API v2 (C#) Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md This method retrieves a list of public repositories using the Bitbucket API v2. It accepts an integer parameter, likely for pagination or limiting results. This method is tested. ```C# RepositoriesEndPoint.ListPublicRepositories(int) ``` -------------------------------- ### Implementing Basic Authentication in SharpBucket (C#) Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md This method initializes SharpBucket for Basic Authentication using a username and password. It is used to authenticate API requests and is tested. ```C# SharpBucket.BasicAuthentication(string username, string password) ``` -------------------------------- ### Create Tag Bitbucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Creates a new tag using the POST method on the Bitbucket API endpoint /repositories/{workspace}/{repo_slug}/refs/tags. This functionality is implemented by the SharpBucket library. ```C# TagsResource.PostTag() *V0.17.0* ``` -------------------------------- ### Retrieving a Specific Repository via SharpBucket API v2 (C#) Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md This method retrieves details for a specific repository identified by its workspace and slug. It is called on a RepositoryResource instance representing the target repository. This method is tested. ```C# RepositoryResource.GetRepository() ``` -------------------------------- ### Implementing OAuth 1.0 Two-Legged Authentication in SharpBucket (C#) Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md This method sets up SharpBucket for OAuth 1.0 Two-Legged Authentication using the consumer key and secret. This method is tested. ```C# SharpBucket.OAuth1TwoLeggedAuthentication(string consumerKey, string consumerSecretKey) ``` -------------------------------- ### Authenticating with OAuth 2.0 Client Credentials (C#) Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Readme.md This snippet shows how to authenticate using the OAuth 2.0 Client Credentials Grant type with SharpBucket. It requires providing your consumer key and secret key and is comparable to OAuth 1.0 two-legged authentication. ```CSharp // authenticate with OAuth keys sharpBucket.OAuth2ClientCredentials(consumerKey, consumerSecretKey); ``` -------------------------------- ### Put Branching Model Settings - BranchingModelResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API PUT endpoint for updating the repository's branching model settings: /repositories/{workspace}/{repo_slug}/branching-model/settings. This method is tested. ```C# BranchingModelResource.PutSettings(BranchingModelSettings) ``` -------------------------------- ### Add New Build Status - RepositoryResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API POST endpoint for adding a new build status to a commit by node: /repositories/{workspace}/{repo_slug}/commit/{node}/statuses/build. This method is tested. ```C# RepositoryResource.AddNewBuildStatus(string,BuildInfo) ``` -------------------------------- ### Completing OAuth 1.0 Three-Legged Authentication in SharpBucket (C#) Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md This method completes the OAuth 1.0 Three-Legged Authentication process using the consumer key, secret, and the obtained OAuth token and token secret. This method is currently not tested. ```C# SharpBucket.OAuth1ThreeLeggedAuthentication(string consumerKey, string consumerSecretKey, string oauthToken, string oauthTokenSecret) ``` -------------------------------- ### Change Build Status Info - RepositoryResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API PUT endpoint for updating a specific build status by key for a commit by node: /repositories/{workspace}/{repo_slug}/commit/{node}/statuses/build/{key}. This method is tested. ```C# RepositoryResource.ChangeBuildStatusInfo(string,string,BuildInfo) ``` -------------------------------- ### Approve Commit - RepositoryResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API POST endpoint for approving a specific commit by node: /repositories/{workspace}/{repo_slug}/commit/{node}/approve. This method is tested. ```C# RepositoryResource.ApproveCommit(string) ``` -------------------------------- ### Post Branch Restriction - RepositoryResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API POST endpoint for creating a branch restriction: /repositories/{workspace}/{repo_slug}/branch-restrictions. This method is currently not tested. ```C# RepositoryResource.PostBranchRestriction(BranchRestriction) ``` -------------------------------- ### Deleting a Repository via SharpBucket API v2 (C#) Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md This method deletes the specific repository represented by the RepositoryResource instance. This action is permanent. This method is tested. ```C# RepositoryResource.DeleteRepository() ``` -------------------------------- ### Implementing OAuth 2 Client Credentials Grant in SharpBucket (C#) Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md This method configures SharpBucket to use the OAuth 2 Client Credentials Grant flow. It requires the consumer key and secret and is used for server-to-server authentication. This method is tested. ```C# SharpBucket.OAuth2ClientCredentials(string consumerKey, string consumerSecretKey) ``` -------------------------------- ### Post Commit Comment - CommitResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API POST endpoint for creating a comment on a specific commit by node: /repositories/{workspace}/{repo_slug}/commit/{node}/comments. This method is tested. ```C# CommitResource(string).CommentsResource.PostComment(CommitComment) ``` -------------------------------- ### Approve Pull Request Bitbucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Approves a specific pull request using the POST method on the Bitbucket API endpoint /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/approve. This functionality is implemented by the SharpBucket library. ```C# PullRequestResource.ApprovePullRequest() ``` -------------------------------- ### Decline Pull Request Bitbucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Declines a specific pull request using the POST method on the Bitbucket API endpoint /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/decline. This functionality is implemented by the SharpBucket library. ```C# PullRequestResource.DeclinePullRequest() ``` -------------------------------- ### Merge Pull Request Bitbucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Merges a specific pull request using the POST method on the Bitbucket API endpoint /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/merge. This functionality is implemented by the SharpBucket library. ```C# PullRequestResource.AcceptAndMergePullRequest() ``` -------------------------------- ### Post Pull Request Comment Bitbucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Posts a new comment to a specific pull request using the POST method on the Bitbucket API endpoint /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments. This functionality is implemented by the SharpBucket library. ```C# PullRequestResource.PostPullRequestComment(Comment) PullRequestResource.CommentsResource.PostComment(PullRequestComment) *v0.14.0* ``` -------------------------------- ### Put Branch Restriction - RepositoryResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API PUT endpoint for updating a specific branch restriction by ID: /repositories/{workspace}/{repo_slug}/branch-restrictions/{id}. This method is currently not tested. ```C# RepositoryResource.PutBranchRestriction(BranchRestriction) ``` -------------------------------- ### Put Commit Comment - CommitResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API PUT endpoint for updating a specific comment by ID on a commit by node: /repositories/{workspace}/{repo_slug}/commit/{node}/comments/{comment_id}. This method is tested. ```C# CommitResource(string).CommentsResource.PutComment(CommitComment) ``` -------------------------------- ### Update Pull Request Comment Bitbucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Updates a specific comment on a pull request using the PUT method on the Bitbucket API endpoint /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}. This functionality is implemented by the SharpBucket library. ```C# PullRequestResource.CommentsResource.PutComment(PullRequestComment) *v0.14.0* ``` -------------------------------- ### Delete Tag Bitbucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Deletes a specific tag using the DELETE method on the Bitbucket API endpoint /repositories/{workspace}/{repo_slug}/refs/tags/{name}. This functionality is implemented by the SharpBucket library. ```C# TagsResource.DeleteTag(string) *V0.17.0* ``` -------------------------------- ### Delete Commit Approval - RepositoryResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API DELETE endpoint for deleting an approval on a specific commit by node: /repositories/{workspace}/{repo_slug}/commit/{node}/approve. This method is tested. ```C# RepositoryResource.DeleteCommitApproval(string) ``` -------------------------------- ### Delete Branch Bitbucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Deletes a specific branch using the DELETE method on the Bitbucket API endpoint /repositories/{workspace}/{repo_slug}/refs/branches/{name}. This functionality is implemented by the SharpBucket library. ```C# BranchResource.DeleteBranch(string) ``` -------------------------------- ### Delete Branch Restriction - RepositoryResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API DELETE endpoint for deleting a specific branch restriction by ID: /repositories/{workspace}/{repo_slug}/branch-restrictions/{id}. This method is currently not tested. ```C# RepositoryResource.DeleteBranchRestriction(int) ``` -------------------------------- ### Delete Commit Comment - CommitResource C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Implements the Bitbucket API DELETE endpoint for deleting a specific comment by ID on a commit by node: /repositories/{workspace}/{repo_slug}/commit/{node}/comments/{comment_id}. This method is tested. ```C# CommitResource(string).CommentsResource.DeleteComment(int) ``` -------------------------------- ### Remove Pull Request Approval Bitbucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Removes the approval for a specific pull request using the DELETE method on the Bitbucket API endpoint /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/approve. This functionality is implemented by the SharpBucket library. ```C# PullRequestResource.RemovePullRequestApproval() ``` -------------------------------- ### Delete Pull Request Comment Bitbucket C# Source: https://github.com/mitjabezensek/sharpbucket/blob/master/Coverage.md Deletes a specific comment on a pull request using the DELETE method on the Bitbucket API endpoint /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}. This functionality is implemented by the SharpBucket library. ```C# PullRequestResource.CommentsResource.DeleteComment(int) *v0.14.0* ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.