public Task <IReadOnlyList <Issue> > GetAllForOwnedAndMemberRepositories(ApiOptions options) { Ensure.ArgumentNotNull(options, nameof(options)); return(GetAllForOwnedAndMemberRepositories(new IssueRequest(), options)); }
public Task <GpgKey> Create(NewGpgKey newGpgKey) { Ensure.ArgumentNotNull(newGpgKey, nameof(newGpgKey)); return(ApiConnection.Post <GpgKey>(ApiUrls.GpgKeys(), newGpgKey, AcceptHeaders.GpgKeysPreview)); }
public Task <IReadOnlyList <Issue> > GetAllForCurrent(IssueRequest request) { Ensure.ArgumentNotNull(request, nameof(request)); return(GetAllForCurrent(request, ApiOptions.None)); }
/// <summary> /// Gets all repositories owned by the specified user. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/#list-user-repositories">API documentation</a> for more information. /// The default page size on GitHub.com is 30. /// </remarks> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> /// <returns>A <see cref="IReadOnlyPagedCollection{Repository}"/> of <see cref="Repository"/>.</returns> public Task <IReadOnlyList <Repository> > GetAllForUser(string login) { Ensure.ArgumentNotNullOrEmptyString(login, "login"); return(ApiConnection.GetAll <Repository>(ApiUrls.Repositories(login))); }
public Task <IReadOnlyList <User> > GetAll(string org) { Ensure.ArgumentNotNullOrEmptyString(org, nameof(org)); return(GetAll(org, ApiOptions.None)); }
public Task <IReadOnlyList <Issue> > GetAllForRepository(long repositoryId, ApiOptions options) { Ensure.ArgumentNotNull(options, nameof(options)); return(GetAllForRepository(repositoryId, new RepositoryIssueRequest(), options)); }
public Task <Issue> Create(long repositoryId, NewIssue newIssue) { Ensure.ArgumentNotNull(newIssue, nameof(newIssue)); return(ApiConnection.Post <Issue>(ApiUrls.Issues(repositoryId), newIssue)); }
/// <summary> /// Gets all repositories owned by the specified user. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/#list-user-repositories">API documentation</a> for more information. /// The default page size on GitHub.com is 30. /// </remarks> /// <param name="login">The account name to search for</param> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> /// <returns>A <see cref="IReadOnlyPagedCollection{Repository}"/> of <see cref="Repository"/>.</returns> public Task <IReadOnlyList <Repository> > GetAllForUser(string login) { Ensure.ArgumentNotNullOrEmptyString(login, "login"); return(GetAllForUser(login, ApiOptions.None)); }
/// <summary> /// Gets all repositories owned by the specified organization. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/#list-organization-repositories">API documentation</a> for more information. /// The default page size on GitHub.com is 30. /// </remarks> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> /// <returns>A <see cref="IReadOnlyPagedCollection{Repository}"/> of <see cref="Repository"/>.</returns> public Task <IReadOnlyList <Repository> > GetAllForOrg(string organization) { Ensure.ArgumentNotNullOrEmptyString(organization, "organization"); return(GetAllForOrg(organization, ApiOptions.None)); }
/// <summary> /// Gets all repositories owned by the current user. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/#list-your-repositories">API documentation</a> for more information. /// </remarks> /// <param name="options">Options for changing the API response</param> /// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> /// <returns>A <see cref="IReadOnlyPagedCollection{Repository}"/> of <see cref="Repository"/>.</returns> public Task <IReadOnlyList <Repository> > GetAllForCurrent(ApiOptions options) { Ensure.ArgumentNotNull(options, "options"); return(ApiConnection.GetAll <Repository>(ApiUrls.Repositories(), options)); }
/// <summary> /// Gets all repositories owned by the current user. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/#list-your-repositories">API documentation</a> for more information. /// The default page size on GitHub.com is 30. /// </remarks> /// <param name="request">Search parameters to filter results on</param> /// <exception cref="AuthorizationException">Thrown if the client is not authenticated.</exception> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> /// <returns>A <see cref="IReadOnlyPagedCollection{Repository}"/> of <see cref="Repository"/>.</returns> public Task <IReadOnlyList <Repository> > GetAllForCurrent(RepositoryRequest request) { Ensure.ArgumentNotNull(request, "request"); return(GetAllForCurrent(request, ApiOptions.None)); }
/// <summary> /// Updates the specified repository with the values given in <paramref name="update"/> /// </summary> /// <param name="repositoryId">The Id of the repository</param> /// <param name="update">New values to update the repository with</param> /// <returns>The updated <see cref="T:Octokit.Repository"/></returns> public Task <Repository> Edit(long repositoryId, RepositoryUpdate update) { Ensure.ArgumentNotNull(update, "update"); return(ApiConnection.Patch <Repository>(ApiUrls.Repository(repositoryId), update, AcceptHeaders.SquashCommitPreview)); }
public Task <Branch> GetBranch(long repositoryId, string branchName) { Ensure.ArgumentNotNullOrEmptyString(branchName, "branchName"); return(Branch.Get(repositoryId, branchName)); }
/// <summary> /// Updates the comment with the specified gist- and comment id. /// </summary> /// <remarks>http://developer.github.com/v3/gists/comments/#edit-a-comment</remarks> /// <param name="gistId">The id of the gist</param> /// <param name="commentId">The id of the comment</param> /// <param name="comment">The updated body of the comment</param> /// <returns>Task{GistComment}.</returns> public Task <GistComment> Update(string gistId, int commentId, string comment) { Ensure.ArgumentNotNullOrEmptyString(comment, "comment"); return(ApiConnection.Patch <GistComment>(ApiUrls.GistComment(gistId, commentId), new BodyWrapper(comment))); }
public Task <IReadOnlyList <Issue> > GetAllForOwnedAndMemberRepositories(IssueRequest request) { Ensure.ArgumentNotNull(request, nameof(request)); return(GetAllForOwnedAndMemberRepositories(request, ApiOptions.None)); }
/// <summary> /// Creates a new repository for the current user. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/#create">API documentation</a> for more information. /// </remarks> /// <param name="newRepository">A <see cref="NewRepository"/> instance describing the new repository to create</param> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> /// <returns>A <see cref="Repository"/> instance for the created repository.</returns> public Task <Repository> Create(NewRepository newRepository) { Ensure.ArgumentNotNull(newRepository, "newRepository"); return(Create(ApiUrls.Repositories(), null, newRepository)); }
public Task <IReadOnlyList <Issue> > GetAllForOrganization(string organization) { Ensure.ArgumentNotNullOrEmptyString(organization, nameof(organization)); return(GetAllForOrganization(organization, ApiOptions.None)); }
public Task <IReadOnlyList <Branch> > GetAllBranches(long repositoryId, ApiOptions options) { Ensure.ArgumentNotNull(options, "options"); return(Branch.GetAll(repositoryId, options)); }
public Task <IReadOnlyList <Issue> > GetAllForRepository(long repositoryId, RepositoryIssueRequest request) { Ensure.ArgumentNotNull(request, nameof(request)); return(GetAllForRepository(repositoryId, request, ApiOptions.None)); }
/// <summary> /// Gets all contributors for the specified repository. Does not include anonymous contributors. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/#list-contributors">API documentation</a> for more details /// </remarks> /// <param name="repositoryId">The Id of the repository</param> /// <param name="options">Options for changing the API response</param> /// <returns>All contributors of the repository.</returns> public Task <IReadOnlyList <RepositoryContributor> > GetAllContributors(long repositoryId, ApiOptions options) { Ensure.ArgumentNotNull(options, "options"); return(GetAllContributors(repositoryId, false, options)); }
public Task <Issue> Update(long repositoryId, int number, IssueUpdate issueUpdate) { Ensure.ArgumentNotNull(issueUpdate, nameof(issueUpdate)); return(ApiConnection.Patch <Issue>(ApiUrls.Issue(repositoryId, number), issueUpdate)); }
/// <summary> /// Gets all tags for the specified repository. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/#list-tags">API documentation</a> for more details /// </remarks> /// <param name="repositoryId">The Id of the repository</param> /// <param name="options">Options for changing the API response</param> /// <returns>All of the repositories tags.</returns> public Task <IReadOnlyList <RepositoryTag> > GetAllTags(long repositoryId, ApiOptions options) { Ensure.ArgumentNotNull(options, "options"); return(ApiConnection.GetAll <RepositoryTag>(ApiUrls.RepositoryTags(repositoryId), options)); }
/// <summary> /// Gets all repositories owned by the specified organization. /// </summary> /// <remarks> /// See the <a href="http://developer.github.com/v3/repos/#list-organization-repositories">API documentation</a> for more information. /// The default page size on GitHub.com is 30. /// </remarks> /// <exception cref="ApiException">Thrown when a general API error occurs.</exception> /// <returns>A <see cref="IReadOnlyPagedCollection{Repository}"/> of <see cref="Repository"/>.</returns> public Task <IReadOnlyList <Repository> > GetAllForOrg(string organization) { Ensure.ArgumentNotNullOrEmptyString(organization, "organization"); return(ApiConnection.GetAll <Repository>(ApiUrls.OrganizationRepositories(organization))); }
public Task <IReadOnlyList <Issue> > GetAllForCurrent(ApiOptions options) { Ensure.ArgumentNotNull(options, nameof(options)); return(GetAllForCurrent(new IssueRequest(), options)); }
public Task <IReadOnlyList <User> > GetAll(string org, OrganizationMembersFilter filter) { Ensure.ArgumentNotNullOrEmptyString(org, nameof(org)); return(GetAll(org, filter, ApiOptions.None)); }
public Task <IReadOnlyList <GpgKey> > GetAllForCurrent(ApiOptions options) { Ensure.ArgumentNotNull(options, nameof(options)); return(ApiConnection.GetAll <GpgKey>(ApiUrls.GpgKeys(), null, AcceptHeaders.GpgKeysPreview, options)); }