/// <summary> /// Gets a list of branches of the repository matching the <paramref name="options"/>. /// </summary> /// <param name="options">The options for the request to the API.</param> /// <returns>An instance of <see cref="SocialHttpResponse"/> representing the raw response.</returns> public SocialHttpResponse GetBranches(BitBucketGetBranchesOptions options) { if (options == null) { throw new ArgumentNullException(nameof(options)); } if (String.IsNullOrWhiteSpace(options.Username)) { throw new ArgumentNullException(nameof(options.Username)); } if (String.IsNullOrWhiteSpace(options.RepoSlug)) { throw new ArgumentNullException(nameof(options.RepoSlug)); } return(Client.DoHttpGetRequest($"/2.0/repositories/{options.Username}/{options.RepoSlug}/refs/branches", options)); }
/// <summary> /// Gets a list of branches of the repository matching the <paramref name="options"/>. /// </summary> /// <param name="options">The options for the request to the API.</param> /// <returns>An instance of <see cref="BitBucketGetBranchesResponse"/> representing the response.</returns> public BitBucketGetBranchesResponse GetBranches(BitBucketGetBranchesOptions options) { return(BitBucketGetBranchesResponse.ParseResponse(Raw.GetBranches(options))); }